Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1301

Unable to build AndroidApk project using qbs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 1.10.0
    • Platforms: Android
    • None
    • Linux Ubuntu 17.10 + Qt Creator 4.5.0/4.6.0-beta1 + qbs 1.10/1.11.0 +  Qt 5.10 + Android NDK r10e + latest Android SDK

       

    Description

      Hi, i'm trying to to switch to qbs from qmake.

      To learn how, i've checked out this example project: https://github.com/qtproject/qt-apps-stb-demo

      There is the only one that uses qbs AndroidApk item on the entire github, by the way.

      And it seems to be written by Qt engineers.

       

      But i'm unable to build it for Android ARMv7 due to several issues:

      1) Sometimes after qbs project modification i got error "file android.gdbserver-info.txt not found"

      2) AndroidManifest.xml placeholders like "@array" or "@string" considered as mistake by Android SDK tool:

      /home/eraxillan/Projects/qt-apps-stb-demo/ui/android/AndroidManifest.xml:15: error: Error: No resource found that matches the given name (at 'resource' with value '@array/qt_sources').

      /home/eraxillan/Projects/qt-apps-stb-demo/ui/android/AndroidManifest.xml:17: error: Error: No resource found that matches the given name (at 'resource' with value '@array/qt_libs').

      /home/eraxillan/Projects/qt-apps-stb-demo/ui/android/AndroidManifest.xml:18: error: Error: No resource found that matches the given name (at 'resource' with value '@array/bundled_libs').

      Process failed with exit code 1.

      I've tried also qmake-generated AndroidManifest.xml, but it contains placeholders too - i.e. build also fails.

       

      3) If i try to specify resourcesDir ("res") manually, than build fails with invalid command line exception of java:

      Error: Process '/usr/lib/jvm/java-8-openjdk-amd64/bin/java' finished with exit code 1. The standard error output was:

      Exception in thread "main" java.lang.IllegalArgumentException: /home/eraxillan/Projects/build-stb-demo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_10_0_for_Android_armv7-Debug/qtc_Android_for_armeabi_v7a_GCC_4_9_Qt_5_10_0_for_Android_armv7_Debug/qt-tv.a8fac7f0/gen/io/qt/stbdemo/R.java

      at io.qt.qbs.tools.utils.JavaCompilerOptions.parse(JavaCompilerOptions.java:80)

      at io.qt.qbs.tools.utils.JavaCompilerScanner.run(JavaCompilerScanner.java:91)

      at io.qt.qbs.tools.JavaCompilerScannerTool.main(JavaCompilerScannerTool.java:43)

       

      If one comment all lines containing such kind of placeholders, then APK will be built successfully - but without path to Qt libraries etc. it will not work correctly.

       

      Link to example QBS project with Android support: https://github.com/qtproject/qt-apps-stb-demo/blob/master/ui/ui.qbs

      Some qbs logs with errors described above were attached.

       

      Is it QBS issue, or some configuration error?

      However, qmake successfully build Android projects on my environment.

       

      Thank you for your work and your help

      Attachments

        1. no_file_error.log
          15 kB
        2. manifest_placeholders_error.log
          39 kB
        3. invalid_command_line.log
          32 kB
        4. diff.txt
          4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            eraxillan Alexander Kamyshnikov
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes