Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Attempting to deploy android app: ABI is incompatible, device supports ABIs
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
15 Posts 6 Posters 4.2k 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.
  • G graniteDev
    4 Jul 2019, 14:55

    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.

    W Offline
    W Offline
    Wiru
    wrote on 4 Jul 2019, 15:46 last edited by
    #4

    @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.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      graniteDev
      wrote on 5 Jul 2019, 15:26 last edited by
      #5

      Environment is fine and happy.

      Kit is Android armeabi-v7a
      compiler is android clang C++ arm
      openjdk-1.8.0
      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)
      NDK-r20

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

      1 Reply Last reply
      0
      • G Offline
        G Offline
        graniteDev
        wrote on 5 Jul 2019, 15:47 last edited by
        #6

        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/TestSwipeApp.pro. 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?

        W 1 Reply Last reply 5 Jul 2019, 17:24
        0
        • G graniteDev
          5 Jul 2019, 15:47

          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/TestSwipeApp.pro. 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?

          W Offline
          W Offline
          Wiru
          wrote on 5 Jul 2019, 17:24 last edited by
          #7

          @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.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            graniteDev
            wrote on 5 Jul 2019, 17:45 last edited by
            #8

            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/libc.so ~/development/build-TestSwipeApp-Android_for_armeabi_v7a_Clang_Qt_5_11_2_for_Android_ARMv7-Release/libc.so".
            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.
            
            1 Reply Last reply
            0
            • G Offline
              G Offline
              graniteDev
              wrote on 5 Jul 2019, 17:47 last edited by
              #9

              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?

              W 1 Reply Last reply 5 Jul 2019, 18:04
              0
              • G graniteDev
                5 Jul 2019, 17:47

                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?

                W Offline
                W Offline
                Wiru
                wrote on 5 Jul 2019, 18:04 last edited by
                #10

                @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.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  graniteDev
                  wrote on 6 Jul 2019, 16:28 last edited by
                  #11

                  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.

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    Marek Pio
                    wrote on 14 Jul 2019, 13:54 last edited by
                    #12

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

                    aha_1980A 1 Reply Last reply 14 Jul 2019, 14:08
                    0
                    • M Marek Pio
                      14 Jul 2019, 13:54

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

                      aha_1980A Offline
                      aha_1980A Offline
                      aha_1980
                      Lifetime Qt Champion
                      wrote on 14 Jul 2019, 14:08 last edited by
                      #13

                      @Marek-Pio You can install an older version (parallel to the updated one) with the offline installers: http://download.qt.io/official_releases/qtcreator

                      Qt has to stay free or it will die.

                      1 Reply Last reply
                      0
                      • F Offline
                        F Offline
                        fXs.
                        wrote on 16 Jul 2019, 05:16 last edited by fXs.
                        #14

                        @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 ndk-gdb.py file but i change anything it have no changes....i try to delete file and load program, and it was started...so i dont understand from where are taking to load app_process32 but not app_process

                        1 Reply Last reply
                        0
                        • C Offline
                          C Offline
                          Chapssrijan
                          wrote on 17 Sept 2019, 17:39 last edited by
                          #15

                          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.

                          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