Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Building Qt for Android
QtWS25 Last Chance

Building Qt for Android

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 1 Posters 1.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rizzer
    wrote on last edited by
    #1

    I'm trying to build Qt for Android on a linux system (Debian unstable). I'm following the procedure at http://qt-project.org/wiki/Qt5ForAndroidBuilding

    I got a fresh git clone, configured, ran make and got the base g++ build completed. Then when the build got to the java at qt5/qtbase/src/android/jar, it halted with the error
    @javac: invalid source release: 6@

    and I've got no further.

    My current javac is 1.6.0_27 (openjdk-6-jdk), with JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64/
    exported and placed at the front of my path. (I also got the same failure with the 1.7.0_25 javac from openjdk-7-jdk)

    The make output is:

    bq.
    make[3]: Entering directory /home/projects/android-qt/qt5/qtbase/src/android' cd jar/ && ( test -e Makefile || /home/projects/android-qt/qt5/qtbase/bin/qmake /home/projects/android-qt/qt5/qtbase/src/android/jar/jar.pro -o Makefile ) && make -f Makefile make[4]: Entering directory /home/projects/android-qt/qt5/qtbase/src/android/jar'
    ( test -e Makefile.bundledjar || /home/projects/android-qt/qt5/qtbase/bin/qmake /home/projects/android-qt/qt5/qtbase/src/android/jar/bundledjar.pro -o Makefile.bundledjar ) && make -f Makefile.bundledjar
    make[5]: Entering directory `/home/projects/android-qt/qt5/qtbase/src/android/jar'
    javac -source 6 -target 6 -cp /home/projects/android-qt/qt5/qtbase/src/android/jar/src/:/home/projects/android-qt/adt-bundle-linux-x86_64-20130917/sdk//platforms/android-10/android.jar -d .classes.bundled src/org/qtproject/qt5/android/QtActivityDelegate.java src/org/qtproject/qt5/android/QtEditText.java src/org/qtproject/qt5/android/QtInputConnection.java src/org/qtproject/qt5/android/QtLayout.java src/org/qtproject/qt5/android/QtNative.java src/org/qtproject/qt5/android/QtNativeLibrariesDir.java src/org/qtproject/qt5/android/QtSurface.java
    javac: invalid source release: 6

    No permutation of javac -source 6 or 7 or 1.6 or 1.7 seemed to help.

    I got the same error with both current git (Qt 5.2 alpha) and the v5.1.1 tag. Likewise with both the current google ndk-r9 (gcc 4.8) and the Qt special build of ndk-r8e (gcc 4.7) listed at http://qt-project.org/wiki/Qt5ForAndroidBuilding (the different ndks made a small difference* to the g++ build, but no difference to this javac error). I only tried the one sdk from adt-bundle-linux-x86_64-20130917.

    Hope you can help!

    . * with ndk-r8e (gcc 4.7) on current git, there were the g++ errors discussed at http://stackoverflow.com/questions/19152204/cc1plus-error-werror-literal-suffix-no-option-wliteral-suffix
    No such error with ndk-r9 on Qt tag v5.1.1.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Rizzer
      wrote on last edited by
      #2

      I've sorted the -source error. javac 1.6 does not recognise "-source 6" (6 is not a valid value for that version of java).

      The jdk needs to be 7 (java 1.7) for "-source 6" to be recognised.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved