Could not read qmake configuration file



  • Hi,

    I'm trying to develop for Android using Qt, but with no success. I have tried several combinations of Qt versions, Android Targets (both emulators and real devices), and development platforms (Mac and Linux). The error message varies, but in all these combinations I have the following errors in the "General Messages" tab :

    @/bin/sh: 1: /opt/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: not found
    Could not read qmake configuration file /home/guilhermebrant/Qt5.2.0/5.2.0-beta1/android_armv7/mkspecs/android-g++/qmake.conf.
    /bin/sh: 1: /opt/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: not found
    Could not read qmake configuration file /home/guilhermebrant/Qt5.2.0/5.2.0-beta1/android_armv5/mkspecs/android-g++/qmake.conf.
    /bin/sh: 1: /opt/android/ndk/toolchains/x86-4.8/prebuilt/linux-x86_64/bin/i686-linux-android-gcc: not found
    Could not read qmake configuration file /home/guilhermebrant/Qt5.2.0/5.2.0-beta1/android_x86/mkspecs/android-g++/qmake.conf.@

    Could this be the issue preventing me from deploying to Android?

    Thanks in advance,
    lgb.


  • Moderators

    Is the NDK installed where Qt is looking for it? Do those paths exist on your machine?



  • Well, I just copied the ndk directory to the one indicated in the error. Now this error message does not appear anymore.
    However, I still get the same error while deploying to Android:

    @BUILD FAILED
    /home/guilhermebrant/android-sdk-linux/tools/ant/build.xml:653: The following error occurred while executing this line:
    /home/guilhermebrant/android-sdk-linux/tools/ant/build.xml:698: null returned: 1

    Total time: 7 seconds
    Generating Android Package
    Input file: /home/guilhermebrant/workspace/lgb-tcc/build-cutedroid-messenger-Android_for_armeabi_GCC_4_8_Qt_5_2_0-Debug/android-libcutedroid-messenger.so-deployment-settings.json
    Output directory: /home/guilhermebrant/workspace/lgb-tcc/build-cutedroid-messenger-Android_for_armeabi_GCC_4_8_Qt_5_2_0-Debug/android
    Application binary: /home/guilhermebrant/workspace/lgb-tcc/build-cutedroid-messenger-Android_for_armeabi_GCC_4_8_Qt_5_2_0-Debug/libcutedroid-messenger.so
    Android build platform: android-10
    Install to device: 0123456789ABCDEF
    [subant] No sub-builds to iterate on
    Building the android package failed!
    -- For more information, run this command with --verbose.
    19:09:33: The process "/home/guilhermebrant/Qt5.2.0/5.2.0-beta1/android_armv5/bin/androiddeployqt" exited with code 14.
    Error while building/deploying project cutedroid-messenger (kit: Android for armeabi (GCC 4.8, Qt 5.2.0))
    When executing step 'Deploy to Android device'@

    Does anyone know a solution to this problem?



  • I think the issue might be the addition of screenSize

    You should have similar line to this one in your AndroidManifest.xml (4th from the top if )

    <activity android:configChanges="orientation|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:screenOrientation="unspecified" android:label="@string/app_name">

    Note the bold part. You likely have screenSize in addition. Remove it, and the preceding | and try to build.



  • Well, another error appears now, the same I had when compilling on MacOs with QtCreator 5.2 Beta, targetting a API 18 emulator device:

    @BUILD FAILED
    /home/guilhermebrant/android-sdk-linux/tools/ant/build.xml:720: The following error occurred while executing this line:
    /home/guilhermebrant/android-sdk-linux/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.

    Total time: 13 seconds
    Building the android package failed!
    -- For more information, run this command with --verbose.
    Generating Android Package
    Input file: /home/guilhermebrant/workspace/lgb-tcc/build-cutedroid-messenger-Android_for_armeabi_GCC_4_8_Qt_5_2_0-Debug/android-libcutedroid-messenger.so-deployment-settings.json
    Output directory: /home/guilhermebrant/workspace/lgb-tcc/build-cutedroid-messenger-Android_for_armeabi_GCC_4_8_Qt_5_2_0-Debug/android
    Application binary: /home/guilhermebrant/workspace/lgb-tcc/build-cutedroid-messenger-Android_for_armeabi_GCC_4_8_Qt_5_2_0-Debug/libcutedroid-messenger.so
    Android build platform: android-10
    Install to device: 0123456789ABCDEF
    [subant] No sub-builds to iterate on
    [javac] /home/guilhermebrant/workspace/lgb-tcc/build-cutedroid-messenger-Android_for_armeabi_GCC_4_8_Qt_5_2_0-Debug/android/gen/org/qtproject/example/cutedroid-messenger/BuildConfig.java:2: error: ';' expected
    [javac] package org.qtproject.example.cutedroid-messenger;
    [javac] ^
    [javac] /home/guilhermebrant/workspace/lgb-tcc/build-cutedroid-messenger-Android_for_armeabi_GCC_4_8_Qt_5_2_0-Debug/android/gen/org/qtproject/example/cutedroid-messenger/R.java:8: error: ';' expected
    [javac] package org.qtproject.example.cutedroid-messenger;
    [javac] ^
    [javac] 2 errors@


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.