Important: Please read the Qt Code of Conduct -

Attempting to deploy android app: ABI is incompatible, device supports ABIs

  • Attempting to deploy an android app to my phone I get this eror: ABI is incompatible, device supports ABIs

    Everything else appears to work fine. I have a project, with an android kit, I just got the java version happy at open jdk version 8 so the kit is happy.

    However I've not been able to find anything useful for this error searching on this forum or on google.

    This is the first time I've tried deploying to an android device. The app I'm trying to deploy is an empty quick app.

  • @graniteDev Just a silly question but did you set up the whole environment to build for android? Based on what you said I'd assume only java is installed.
    In any case check this guide, till step 5 it has the general stuff you need to setup, the rest is for publishing apps.

  • Yes, I have the environment setup. I mentioned the Java version as that was the last problem that took me several hours to figure out. You can't use anything past openjdk-8 for some reason - and even then you have to add environment variables just to turn off a whole bunch of errors that prevent it from working.

    Now once all that was working and compiling for desktop (Linux 64bit) I then tried compiling for Android. It won't do that directly, I learned this from previous cross compiling work I've done, so I select Build>Deploy Project "TestApp"

    The popup dialog then shows the compatible/incompatible devices, with my device being listed as incompatible, stating that it requires ABIs instead of ABI.

    I've searched for hours, with no success on this. Some claim android 29 fixes this, which I can't use as my device is android 26. Other sources claim it has to do with a bug in Qt where QtCreator is expecting a specific string from the build to check against the phone, and is not getting the string it expects, so it thinks it's incompatible.

    It's really weird, leaves me feeling like no one actually uses QtCreator to build for Android.

  • @graniteDev I might sound like a broken record, but just double check the whole environment is set up for what you trying to build.
    Personally I have no issues building for android with Qt creator. Just the first few times setting it up can be a pain till you get used to what needs to be configured.
    Can you post your configuration? Exact NDK, SDK, open jdk versions displayed in Qt creator.
    Also make sure you have the right Qt kits( armv7, arm64_v8a) installed for device use and not the emulator version by mistake.
    Also I dont remember having to disable any options for jdk to work. I'm using the official open jdk 1.8u212.
    Also for some android devices (at least I do) you have to run adb as root ( sudo ./adb start-server) or it will list your device as not supported, if the server is already running just ./adb kill-server and then start.

  • Environment is fine and happy.

    Kit is Android armeabi-v7a
    compiler is android clang C++ arm
    SDK version 26.1.1 (I can't change this, I have used android studio to install other verions, but this all Qt shows and I can't see any way to change it)

    You wrote ./adb but don't tell me what folder to run that in. Where does adb live?

  • Ok, found adb, started it, now when I try to deploy I get this compile error

    Deploying to ZY2233FMDC
    Cannot find the androiddeploy Json file.
    Error while building/deploying project TestSwipeApp (kit: Android for armeabi-v7a (Clang Qt 5.11.2 for Android ARMv7))
    When executing step "Deploy to Android device"

    I honestly really thought this would be easier. It's very frustrating.

    I'm also concerned about, how do I just build an APK? I'm just realizing I can't compile an APK with QtCreator because it refuses to compile. When you first open an android project you get all these errors:

    /bin/sh: 1: ~/Android/android-ndk-r20/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++: not found
    Project ERROR: Cannot run target compiler '~/Android/android-ndk-r20/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++'. Output:
    /bin/sh: 1: ~/Android/android-ndk-r20/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++: not found
    Maybe you forgot to setup the environment?
    Error while parsing file ~/development/TestSwipeApp/ Giving up.

    It's correct, there is no arm-linux-androideabi-g++ but nor can I find a download for such. Why is this missing from the standard NDK? It's got over a dozen other builders in bin but not the one needed on a 64bit Linux system? What's up with that?

  • @graniteDev Based on the log, you are using Qt 5.11.2 with NDK 20 which are not compatible.
    For Qt 5.11.2 use NDK 17c, can be downloaded from the archives from android. Or update to Qt 5.12.4 snd use NDK 19c as NDK 20 isn't supported yet.

    Additionally if you use NDK 17c make sure that in your .pro file you use android-g++ or for NDK 19c android-clang (if you don't see any of that in the pro file ignore it for now)

    The apk is usually found in the build folder that Qt makes, I don't remember the exact file path, but once the build is successful it will be there.

  • How did you know that it was incompatible? The kit gave no indication, nor did the device/android setup give any indication that it was a problem.

    I'm farther now, but still failing to build an APK when I ask it to build for Android

    13:41:01: The process "~Android/android-ndk-r17c/prebuilt/linux-x86_64/bin/make" exited normally.
    13:41:01: No application .pro file found, not building an APK.
    13:41:01: Elapsed time: 00:00.

    When trying to deploy to the phone, with ADB running the phone now is compatible - again here I blame Qt for not making the error more obvious. It should be able to detect that ADB was not running. However I get all these errors:

    adb: failed to stat ~/development/build-TestSwipeApp-Android_for_armeabi_v7a_Clang_Qt_5_11_2_for_Android_ARMv7-Release/android-build//build/outputs/apk/android-build-debug.apk: No such file or directory
    Installing to device failed!
    Installing Android package to device.
    Running command "~/Android/Sdk/platform-tools/adb -s ZY2233FMDC  install -r ~/development/build-TestSwipeApp-Android_for_armeabi_v7a_Clang_Qt_5_11_2_for_Android_ARMv7-Release/android-build//build/outputs/apk/android-build-debug.apk"
    Performing Streamed Install
    13:43:15: The process "~/Qt/5.11.2/android_armv7/bin/androiddeployqt" exited with code 16.
    13:43:15: Pulling files necessary for debugging.
    13:43:15: Package deploy: Running command "~/Android/Sdk/platform-tools/adb -s ZY2233FMDC pull /system/bin/app_process ~/development/build-TestSwipeApp-Android_for_armeabi_v7a_Clang_Qt_5_11_2_for_Android_ARMv7-Release/app_process".
    13:43:15: Package deploy: Running command "~/Android/Sdk/platform-tools/adb -s ZY2233FMDC pull /system/bin/app_process32 ~/development/build-TestSwipeApp-Android_for_armeabi_v7a_Clang_Qt_5_11_2_for_Android_ARMv7-Release/app_process".
    13:43:15: Package deploy: Running command "~/Android/Sdk/platform-tools/adb -s ZY2233FMDC pull /system/bin/linker ~/development/build-TestSwipeApp-Android_for_armeabi_v7a_Clang_Qt_5_11_2_for_Android_ARMv7-Release/linker".
    13:43:15: Package deploy: Running command "~/Android/Sdk/platform-tools/adb -s ZY2233FMDC pull /system/lib/ ~/development/build-TestSwipeApp-Android_for_armeabi_v7a_Clang_Qt_5_11_2_for_Android_ARMv7-Release/".
    Error while building/deploying project TestSwipeApp (kit: Android for armeabi-v7a (Clang Qt 5.11.2 for Android ARMv7))
    When executing step "Deploy to Android device"
    13:43:15: Elapsed time: 00:01.

  • You say to use android-g++ in the .pro file, but how? You need to be more specific. Does that go under QT, CONFIG, DEFINES or something else?

  • @graniteDev If you made a project (i.e. Qt quick application) you should have a .pro file, which here seems not to exist or can't be found.
    The android-g++ is only necessary if you add some additional/android only libs, for a new project that should not be the case, that's why I said u can ignore it if you don't have anything like that.

    In .pro file it looks something like

    android-g++ {
    some android only includes

    For now just try to make a new empty qt quick application project, and try to run it on the phone. It doesn't change much, but use the debug version to compile till you actually want to make a release.

  • I have an empty project, and it has a .pro file. I'm giving up. I tried all this week to get this to work. In 5 minutes I had a blank app on my phone with Android Studio. Qt really needs to get it's act together with this. It's shameful how awful this is.

  • I had a stupid idea to let QT Creator do update. After several hours I can't detect my devices. Good choice for Sunday.

  • Lifetime Qt Champion

    @Marek-Pio You can install an older version (parallel to the updated one) with the offline installers:

  • @Wiru
    I have simular problem. I try to use same as you say:
    Qt 5.12.4
    NDK 19c 64bit
    QT creator 4.9.2
    Windows 10
    For me program strart, but in the debuging mode, breakpoint dont stop if i try to use on Android 4.4.4. If i try to start debuging on Android 9 everythings work okey. I have to use old Android version becouse we use on our system. After i start on old Android version i get message like this:

    08:11:14: The command "E:\Android\sdk\platform-tools\adb.exe" terminated with exit code 1.
    08:11:14: Package deploy: Failed to pull "/system/bin/app_process32" to "Android_for_armeabi_v7a_Clang_Qt_5_12_4_for_Android_ARMv7-Debug/app_process".

    I think the main problem that qt try to use app_process32 and he cant find it becouse on old Android version there is only app_process .

    So how to change app_process32 to app_process on qt debuging mode? I try to search in google but i didnt find correct answer.

    I found that i can change in file but i change anything it have no changes....i try to delete file and load program, and it was i dont understand from where are taking to load app_process32 but not app_process

  • Hello,

    I faced the same problem and searched everywhere for hours. At the end found out that when i created new project i didn't add the preferred choice of devices like arm64-v8 and all other. Make sure you did while creating new project.

Log in to reply