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. Android app doesn't run
Forum Updated to NodeBB v4.3 + New Features

Android app doesn't run

Scheduled Pinned Locked Moved Solved Mobile and Embedded
87 Posts 7 Posters 21.0k Views 3 Watching
  • 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.
  • J JoeCFD
    8 Jan 2024, 16:58

    @mzimmers I do not know the mismatch issue. I have only Open Java 11 in my Linux computer.

    M Offline
    M Offline
    mzimmers
    wrote on 12 Jan 2024, 00:03 last edited by mzimmers 1 Dec 2024, 00:09
    #61

    An update: I was able to install my application from the command line (using adb.exe). So, there's nothing wrong with my .apk file; it appears the problem is in Creator 12.0.1 (or the way I'm using it).

    E 2 Replies Last reply 12 Jan 2024, 08:45
    0
    • M mzimmers
      12 Jan 2024, 00:03

      An update: I was able to install my application from the command line (using adb.exe). So, there's nothing wrong with my .apk file; it appears the problem is in Creator 12.0.1 (or the way I'm using it).

      E Offline
      E Offline
      ekkescorner
      Qt Champions 2016
      wrote on 12 Jan 2024, 08:45 last edited by
      #62

      @mzimmers perhaps you run into this: https://forum.qt.io/post/785169

      ekke ... Qt Champion 2016 | 2024 ... mobile business apps
      5.15 --> 6.8 https://t1p.de/ekkeChecklist
      QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

      M 1 Reply Last reply 12 Jan 2024, 13:55
      1
      • M mzimmers
        12 Jan 2024, 00:03

        An update: I was able to install my application from the command line (using adb.exe). So, there's nothing wrong with my .apk file; it appears the problem is in Creator 12.0.1 (or the way I'm using it).

        E Offline
        E Offline
        ekkescorner
        Qt Champions 2016
        wrote on 12 Jan 2024, 08:50 last edited by
        #63

        @mzimmers you can try a QtCreator 12.0.2 snapshot: https://download.qt.io/snapshots/qtcreator/12.0/12.0.2/28/
        let us know if this works better

        ekke ... Qt Champion 2016 | 2024 ... mobile business apps
        5.15 --> 6.8 https://t1p.de/ekkeChecklist
        QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

        1 Reply Last reply
        0
        • K Offline
          K Offline
          Kim Nancy
          wrote on 12 Jan 2024, 08:58 last edited by
          #64

          The error suggests an issue with the AndroidManifest.xml activity class. Verify correct package and activity names, check for recent changes, and ensure accuracy in your project's configuration.

          1 Reply Last reply
          0
          • E ekkescorner
            12 Jan 2024, 08:45

            @mzimmers perhaps you run into this: https://forum.qt.io/post/785169

            M Offline
            M Offline
            mzimmers
            wrote on 12 Jan 2024, 13:55 last edited by
            #65

            @ekkescorner said in Android app doesn't run:

            @mzimmers perhaps you run into this: https://forum.qt.io/post/785169

            This definitely helps. Combined with regenerating the android files, and deleting the build directory, I'm past that error. (I'm onto another error, but I think this is my doing. I'm posting the relevant output here.)

            E project.exampl: Not starting debugger since process cannot load the jdwp agent.
            W System  : ClassLoader referenced unknown path:
            I DecorView: [INFO] isPopOver=false, config=true
            I DecorView: updateCaptionType >> DecorView@c5c2492[], isFloating=false, isApplication=true, hasWindowDecorCaption=false, hasWindowControllerCallback=true
            W linker  : Warning: "/data/app/~~J43OE5MfUdxnaBtJpASGww==/org.qtproject.example-lakyk1zLaHW5FUEWp05dDQ==/lib/arm64/libc++_shared.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
            W Gralloc3: mapper 3.x is not supported
            E linker  : library "/system/lib/libcrypto.so" ("/system/lib/libcrypto.so") needed or dlopened by "/data/app/~~J43OE5MfUdxnaBtJpASGww==/org.qtproject.example-lakyk1zLaHW5FUEWp05dDQ==/lib/arm64/libQt6Core_arm64-v8a.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="/data/app/~~J43OE5MfUdxnaBtJpASGww==/org.qtproject.example-lakyk1zLaHW5FUEWp05dDQ==/lib/arm64:/data/app/~~J43OE5MfUdxnaBtJpASGww==/org.qtproject.example-lakyk1zLaHW5FUEWp05dDQ==/base.apk!/lib/arm64-v8a", permitted_paths="/data:/mnt/expand:/data/data/org.qtproject.example"]
            W qt.tlsbackend.ossl: : Failed to load libssl/libcrypto.
            W qt.network.ssl: : The backend "cert-only" does not support QSslKey
            W qt.network.ssl: : Active TLS backend does not support key creation
            W libappNgaIcdFw_arm64-v8a.so: QQmlApplicationEngine failed to load component
            W libappNgaIcdFw_arm64-v8a.so: <Unknown File>: No module named "ngaIcdFw" found
            W libappNgaIcdFw_arm64-v8a.so: exit app 0
            05:42:56: 
            "org.qtproject.example" died.
            

            I think this has to do with a recent restructuring of my project files and folders.

            So:

            • delete the build directory
            • clear your Qt Creator cache
            • use Creator to generate but NOT modify AndroidManifest.xml

            appears to be a successful procedure, if my above assumption about my project restructuring is true. I'll do some more experimentation and report back.

            Oh, I tried 12.0.2...no improvement. Thanks for the link, though.

            E J 3 Replies Last reply 13 Jan 2024, 18:03
            0
            • M mzimmers
              12 Jan 2024, 13:55

              @ekkescorner said in Android app doesn't run:

              @mzimmers perhaps you run into this: https://forum.qt.io/post/785169

              This definitely helps. Combined with regenerating the android files, and deleting the build directory, I'm past that error. (I'm onto another error, but I think this is my doing. I'm posting the relevant output here.)

              E project.exampl: Not starting debugger since process cannot load the jdwp agent.
              W System  : ClassLoader referenced unknown path:
              I DecorView: [INFO] isPopOver=false, config=true
              I DecorView: updateCaptionType >> DecorView@c5c2492[], isFloating=false, isApplication=true, hasWindowDecorCaption=false, hasWindowControllerCallback=true
              W linker  : Warning: "/data/app/~~J43OE5MfUdxnaBtJpASGww==/org.qtproject.example-lakyk1zLaHW5FUEWp05dDQ==/lib/arm64/libc++_shared.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
              W Gralloc3: mapper 3.x is not supported
              E linker  : library "/system/lib/libcrypto.so" ("/system/lib/libcrypto.so") needed or dlopened by "/data/app/~~J43OE5MfUdxnaBtJpASGww==/org.qtproject.example-lakyk1zLaHW5FUEWp05dDQ==/lib/arm64/libQt6Core_arm64-v8a.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="/data/app/~~J43OE5MfUdxnaBtJpASGww==/org.qtproject.example-lakyk1zLaHW5FUEWp05dDQ==/lib/arm64:/data/app/~~J43OE5MfUdxnaBtJpASGww==/org.qtproject.example-lakyk1zLaHW5FUEWp05dDQ==/base.apk!/lib/arm64-v8a", permitted_paths="/data:/mnt/expand:/data/data/org.qtproject.example"]
              W qt.tlsbackend.ossl: : Failed to load libssl/libcrypto.
              W qt.network.ssl: : The backend "cert-only" does not support QSslKey
              W qt.network.ssl: : Active TLS backend does not support key creation
              W libappNgaIcdFw_arm64-v8a.so: QQmlApplicationEngine failed to load component
              W libappNgaIcdFw_arm64-v8a.so: <Unknown File>: No module named "ngaIcdFw" found
              W libappNgaIcdFw_arm64-v8a.so: exit app 0
              05:42:56: 
              "org.qtproject.example" died.
              

              I think this has to do with a recent restructuring of my project files and folders.

              So:

              • delete the build directory
              • clear your Qt Creator cache
              • use Creator to generate but NOT modify AndroidManifest.xml

              appears to be a successful procedure, if my above assumption about my project restructuring is true. I'll do some more experimentation and report back.

              Oh, I tried 12.0.2...no improvement. Thanks for the link, though.

              E Offline
              E Offline
              ekkescorner
              Qt Champions 2016
              wrote on 13 Jan 2024, 18:03 last edited by
              #66

              @mzimmers said in Android app doesn't run:

              use Creator to generate but NOT modify AndroidManifest.xml

              if you mean by 'generate' to create templates then you must do your customization in AndrouidManifest: change application name, activity name and other properties of AndroidManifest. depends from your use-case

              ekke ... Qt Champion 2016 | 2024 ... mobile business apps
              5.15 --> 6.8 https://t1p.de/ekkeChecklist
              QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

              1 Reply Last reply
              0
              • M mzimmers
                12 Jan 2024, 13:55

                @ekkescorner said in Android app doesn't run:

                @mzimmers perhaps you run into this: https://forum.qt.io/post/785169

                This definitely helps. Combined with regenerating the android files, and deleting the build directory, I'm past that error. (I'm onto another error, but I think this is my doing. I'm posting the relevant output here.)

                E project.exampl: Not starting debugger since process cannot load the jdwp agent.
                W System  : ClassLoader referenced unknown path:
                I DecorView: [INFO] isPopOver=false, config=true
                I DecorView: updateCaptionType >> DecorView@c5c2492[], isFloating=false, isApplication=true, hasWindowDecorCaption=false, hasWindowControllerCallback=true
                W linker  : Warning: "/data/app/~~J43OE5MfUdxnaBtJpASGww==/org.qtproject.example-lakyk1zLaHW5FUEWp05dDQ==/lib/arm64/libc++_shared.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
                W Gralloc3: mapper 3.x is not supported
                E linker  : library "/system/lib/libcrypto.so" ("/system/lib/libcrypto.so") needed or dlopened by "/data/app/~~J43OE5MfUdxnaBtJpASGww==/org.qtproject.example-lakyk1zLaHW5FUEWp05dDQ==/lib/arm64/libQt6Core_arm64-v8a.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="/data/app/~~J43OE5MfUdxnaBtJpASGww==/org.qtproject.example-lakyk1zLaHW5FUEWp05dDQ==/lib/arm64:/data/app/~~J43OE5MfUdxnaBtJpASGww==/org.qtproject.example-lakyk1zLaHW5FUEWp05dDQ==/base.apk!/lib/arm64-v8a", permitted_paths="/data:/mnt/expand:/data/data/org.qtproject.example"]
                W qt.tlsbackend.ossl: : Failed to load libssl/libcrypto.
                W qt.network.ssl: : The backend "cert-only" does not support QSslKey
                W qt.network.ssl: : Active TLS backend does not support key creation
                W libappNgaIcdFw_arm64-v8a.so: QQmlApplicationEngine failed to load component
                W libappNgaIcdFw_arm64-v8a.so: <Unknown File>: No module named "ngaIcdFw" found
                W libappNgaIcdFw_arm64-v8a.so: exit app 0
                05:42:56: 
                "org.qtproject.example" died.
                

                I think this has to do with a recent restructuring of my project files and folders.

                So:

                • delete the build directory
                • clear your Qt Creator cache
                • use Creator to generate but NOT modify AndroidManifest.xml

                appears to be a successful procedure, if my above assumption about my project restructuring is true. I'll do some more experimentation and report back.

                Oh, I tried 12.0.2...no improvement. Thanks for the link, though.

                J Offline
                J Offline
                JoeCFD
                wrote on 14 Jan 2024, 03:49 last edited by
                #67

                @mzimmers said in Android app doesn't run:

                W qt.tlsbackend.ossl: : Failed to load libssl/libcrypto.

                W qt.tlsbackend.ossl: : Failed to load libssl/libcrypto.so
                this lib is needed in your app. Add it to your build script.

                1 Reply Last reply
                0
                • M mzimmers
                  12 Jan 2024, 13:55

                  @ekkescorner said in Android app doesn't run:

                  @mzimmers perhaps you run into this: https://forum.qt.io/post/785169

                  This definitely helps. Combined with regenerating the android files, and deleting the build directory, I'm past that error. (I'm onto another error, but I think this is my doing. I'm posting the relevant output here.)

                  E project.exampl: Not starting debugger since process cannot load the jdwp agent.
                  W System  : ClassLoader referenced unknown path:
                  I DecorView: [INFO] isPopOver=false, config=true
                  I DecorView: updateCaptionType >> DecorView@c5c2492[], isFloating=false, isApplication=true, hasWindowDecorCaption=false, hasWindowControllerCallback=true
                  W linker  : Warning: "/data/app/~~J43OE5MfUdxnaBtJpASGww==/org.qtproject.example-lakyk1zLaHW5FUEWp05dDQ==/lib/arm64/libc++_shared.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
                  W Gralloc3: mapper 3.x is not supported
                  E linker  : library "/system/lib/libcrypto.so" ("/system/lib/libcrypto.so") needed or dlopened by "/data/app/~~J43OE5MfUdxnaBtJpASGww==/org.qtproject.example-lakyk1zLaHW5FUEWp05dDQ==/lib/arm64/libQt6Core_arm64-v8a.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="/data/app/~~J43OE5MfUdxnaBtJpASGww==/org.qtproject.example-lakyk1zLaHW5FUEWp05dDQ==/lib/arm64:/data/app/~~J43OE5MfUdxnaBtJpASGww==/org.qtproject.example-lakyk1zLaHW5FUEWp05dDQ==/base.apk!/lib/arm64-v8a", permitted_paths="/data:/mnt/expand:/data/data/org.qtproject.example"]
                  W qt.tlsbackend.ossl: : Failed to load libssl/libcrypto.
                  W qt.network.ssl: : The backend "cert-only" does not support QSslKey
                  W qt.network.ssl: : Active TLS backend does not support key creation
                  W libappNgaIcdFw_arm64-v8a.so: QQmlApplicationEngine failed to load component
                  W libappNgaIcdFw_arm64-v8a.so: <Unknown File>: No module named "ngaIcdFw" found
                  W libappNgaIcdFw_arm64-v8a.so: exit app 0
                  05:42:56: 
                  "org.qtproject.example" died.
                  

                  I think this has to do with a recent restructuring of my project files and folders.

                  So:

                  • delete the build directory
                  • clear your Qt Creator cache
                  • use Creator to generate but NOT modify AndroidManifest.xml

                  appears to be a successful procedure, if my above assumption about my project restructuring is true. I'll do some more experimentation and report back.

                  Oh, I tried 12.0.2...no improvement. Thanks for the link, though.

                  E Offline
                  E Offline
                  ekkescorner
                  Qt Champions 2016
                  wrote on 14 Jan 2024, 11:01 last edited by
                  #68

                  @mzimmers take a look at https://github.com/KDAB/android_openssl to get openssl

                  ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                  5.15 --> 6.8 https://t1p.de/ekkeChecklist
                  QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                  M 1 Reply Last reply 14 Jan 2024, 15:06
                  1
                  • E ekkescorner
                    14 Jan 2024, 11:01

                    @mzimmers take a look at https://github.com/KDAB/android_openssl to get openssl

                    M Offline
                    M Offline
                    mzimmers
                    wrote on 14 Jan 2024, 15:06 last edited by
                    #69

                    @ekkescorner @JoeCFD thanks for the suggestions.

                    After fixing the problem in my project structure, I am now able to load the program through Creator, sometimes. Sometimes I get the original error. I am also able to load the .apk from the command line (outside of Creator), so I'm reasonably confident the problem isn't in how my .apk is built.

                    I'm trying to ascertain why I'm still having only intermittent success with Creator. When I can determine a reliable procedure, I'll post it here.

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mzimmers
                      wrote on 18 Aug 2024, 00:37 last edited by
                      #70

                      Hi all - I need to return my attention to this -- I've got to get this working.

                      All my build setup items seem in place, and the project builds for Android just fine. But when I try to deploy and run, I get this same old error message:

                      Activity Manager threw the error: Error type 3
                      Error: Activity class {org.qtproject.example/org.qtproject.qt.android.bindings.QtActivity} does not exist.
                      

                      Can anyone give me an idea what's going wrong here? Thanks...

                      1 Reply Last reply
                      0
                      • E Offline
                        E Offline
                        ekkescorner
                        Qt Champions 2016
                        wrote on 18 Aug 2024, 08:30 last edited by
                        #71

                        what's your actual environment ?
                        Qt version, QtCreator Version
                        JDK, NDK, Java API
                        QMake or CMake

                        ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                        5.15 --> 6.8 https://t1p.de/ekkeChecklist
                        QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          mzimmers
                          wrote on 18 Aug 2024, 12:21 last edited by mzimmers
                          #72

                          @ekkescorner

                          • Qt 6.5.3
                          • Qt Creator 14.0.1
                          • SDK Version: 12.0
                          • NDK Version: 25.1.8937393
                          • JDK 17
                          • Using CMake
                          • Windows 11

                          Not sure what you mean by Java API, but maybe this will help:

                          C:\Users\michael.zimmers>java --version
                          java 17.0.9 2023-10-17 LTS
                          Java(TM) SE Runtime Environment (build 17.0.9+11-LTS-201)
                          Java HotSpot(TM) 64-Bit Server VM (build 17.0.9+11-LTS-201, mixed mode, sharing)
                          
                          C:\Users\michael.zimmers>
                          

                          Thanks for any assistance.

                          E 1 Reply Last reply 18 Aug 2024, 12:43
                          0
                          • M mzimmers
                            18 Aug 2024, 12:21

                            @ekkescorner

                            • Qt 6.5.3
                            • Qt Creator 14.0.1
                            • SDK Version: 12.0
                            • NDK Version: 25.1.8937393
                            • JDK 17
                            • Using CMake
                            • Windows 11

                            Not sure what you mean by Java API, but maybe this will help:

                            C:\Users\michael.zimmers>java --version
                            java 17.0.9 2023-10-17 LTS
                            Java(TM) SE Runtime Environment (build 17.0.9+11-LTS-201)
                            Java HotSpot(TM) 64-Bit Server VM (build 17.0.9+11-LTS-201, mixed mode, sharing)
                            
                            C:\Users\michael.zimmers>
                            

                            Thanks for any assistance.

                            E Offline
                            E Offline
                            ekkescorner
                            Qt Champions 2016
                            wrote on 18 Aug 2024, 12:43 last edited by
                            #73

                            @mzimmers said in Android app doesn't run:

                            Not sure what you mean by Java API

                            I meant

                            set_target_properties(${MY_APP}
                                PROPERTIES
                                    QT_ANDROID_MIN_SDK_VERSION 26
                                    QT_ANDROID_TARGET_SDK_VERSION 34
                            )
                            

                            my settings from 6.7.1
                            for 6.5 seems to be 23, 33 (see https://www.qt.io/blog/qt-for-android-supported-versions-guidelines)

                            Thanks for any assistance.
                            ATM have no idea

                            have you created (updated) Android Templates so all fits together ?

                            ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                            5.15 --> 6.8 https://t1p.de/ekkeChecklist
                            QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                            M 1 Reply Last reply 18 Aug 2024, 15:30
                            0
                            • E ekkescorner
                              18 Aug 2024, 12:43

                              @mzimmers said in Android app doesn't run:

                              Not sure what you mean by Java API

                              I meant

                              set_target_properties(${MY_APP}
                                  PROPERTIES
                                      QT_ANDROID_MIN_SDK_VERSION 26
                                      QT_ANDROID_TARGET_SDK_VERSION 34
                              )
                              

                              my settings from 6.7.1
                              for 6.5 seems to be 23, 33 (see https://www.qt.io/blog/qt-for-android-supported-versions-guidelines)

                              Thanks for any assistance.
                              ATM have no idea

                              have you created (updated) Android Templates so all fits together ?

                              M Offline
                              M Offline
                              mzimmers
                              wrote on 18 Aug 2024, 15:30 last edited by
                              #74

                              @ekkescorner I've created the templates, but I haven't modified them. I can't find documentation that tells me how to populate the fields.
                              Screenshot 2024-08-18 082850.png
                              Note that the pulldowns for setting the SDK are disabled.

                              E JKSHJ 2 Replies Last reply 18 Aug 2024, 15:53
                              0
                              • M mzimmers
                                18 Aug 2024, 15:30

                                @ekkescorner I've created the templates, but I haven't modified them. I can't find documentation that tells me how to populate the fields.
                                Screenshot 2024-08-18 082850.png
                                Note that the pulldowns for setting the SDK are disabled.

                                E Offline
                                E Offline
                                ekkescorner
                                Qt Champions 2016
                                wrote on 18 Aug 2024, 15:53 last edited by
                                #75

                                @mzimmers said in Android app doesn't run:

                                Note that the pulldowns for setting the SDK are disabled.

                                Google has changed this long time ago. Now Min and Target are managed by Gradle and not the Manifest.

                                here's some info from my blogs HowTo do this with CMake:
                                https://ekkesapps.wordpress.com/qt-6-in-action/qmake-cmake/android-specific/

                                ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                                5.15 --> 6.8 https://t1p.de/ekkeChecklist
                                QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                                1 Reply Last reply
                                0
                                • M mzimmers
                                  18 Aug 2024, 15:30

                                  @ekkescorner I've created the templates, but I haven't modified them. I can't find documentation that tells me how to populate the fields.
                                  Screenshot 2024-08-18 082850.png
                                  Note that the pulldowns for setting the SDK are disabled.

                                  JKSHJ Offline
                                  JKSHJ Offline
                                  JKSH
                                  Moderators
                                  wrote on 19 Aug 2024, 01:55 last edited by
                                  #76

                                  @mzimmers said in Android app doesn't run:

                                  @ekkescorner I've created the templates, but I haven't modified them. I can't find documentation that tells me how to populate the fields.
                                  Screenshot 2024-08-18 082850.png
                                  Note that the pulldowns for setting the SDK are disabled.

                                  That editor is badly broken. I recommend avoiding it: https://bugreports.qt.io/browse/QTCREATORBUG-27119

                                  As a quick sanity check, create a new "Hello World" project. Does that build and run correctly?

                                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                  1 Reply Last reply
                                  0
                                  • M Offline
                                    M Offline
                                    mzimmers
                                    wrote on 19 Aug 2024, 02:28 last edited by
                                    #77

                                    @JKSH OK, built a new project. I configured it for Android, but there's nothing in the CMakeLists.txt file about Android. (I didn't add any of the stuff that @ekkescorner mentions on his web page.) When I build, I get an error:

                                    :-1: error:      aapt2.exe E 08-18 19:22:13 16988 23404 ApkAssets.cpp:149] Failed to load resources table in APK 'C:\Users\michael.zimmers\AppData\Local\Android\Sdk\platforms\android-35\android.jar'.
                                         error: failed to load include path C:\Users\michael.zimmers\AppData\Local\Android\Sdk\platforms\android-35\android.jar.
                                    
                                    * Try:
                                    > Run with --stacktrace option to get the stack trace.
                                    > Run with --info or --debug option to get more log output.
                                    > Run with --scan to get full insights.
                                    
                                    * Get more help at https://help.gradle.org
                                    

                                    So, I'm not sure where to go from here. It's hard to tell whether the problem is in my Android setup, or my specific project settings.

                                    E 1 Reply Last reply 19 Aug 2024, 05:25
                                    0
                                    • M mzimmers
                                      19 Aug 2024, 02:28

                                      @JKSH OK, built a new project. I configured it for Android, but there's nothing in the CMakeLists.txt file about Android. (I didn't add any of the stuff that @ekkescorner mentions on his web page.) When I build, I get an error:

                                      :-1: error:      aapt2.exe E 08-18 19:22:13 16988 23404 ApkAssets.cpp:149] Failed to load resources table in APK 'C:\Users\michael.zimmers\AppData\Local\Android\Sdk\platforms\android-35\android.jar'.
                                           error: failed to load include path C:\Users\michael.zimmers\AppData\Local\Android\Sdk\platforms\android-35\android.jar.
                                      
                                      * Try:
                                      > Run with --stacktrace option to get the stack trace.
                                      > Run with --info or --debug option to get more log output.
                                      > Run with --scan to get full insights.
                                      
                                      * Get more help at https://help.gradle.org
                                      

                                      So, I'm not sure where to go from here. It's hard to tell whether the problem is in my Android setup, or my specific project settings.

                                      E Offline
                                      E Offline
                                      ekkescorner
                                      Qt Champions 2016
                                      wrote on 19 Aug 2024, 05:25 last edited by
                                      #78

                                      @mzimmers running Qt Examples without changes this should work without creating and modifying templates.
                                      If examples don't run there seems to be something wrong with your Android / QtC installation
                                      BTW: you can verify the settings for min and target. go to your build dir and take a look at

                                      build
                                          android-build
                                                gradle.properties
                                      

                                      ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                                      5.15 --> 6.8 https://t1p.de/ekkeChecklist
                                      QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                                      1 Reply Last reply
                                      0
                                      • M Offline
                                        M Offline
                                        mzimmers
                                        wrote on 19 Aug 2024, 13:01 last edited by mzimmers
                                        #79

                                        @ekkescorner just to be clear, this error didn't come from one of the presupplied Qt examples. I created it using the project wizard.

                                        Here are the version settings in my gradle.properties file:

                                        androidBuildToolsVersion=33.0.0
                                        androidCompileSdkVersion=android-35
                                        androidNdkVersion=25.1.8937393
                                        qtMinSdkVersion=23
                                        qtTargetAbiList=arm64-v8a
                                        qtTargetSdkVersion=31
                                        

                                        They don't seem to match what you indicated would be correct.

                                        BTW: Is there a typo in this section of your page?

                                        Qt supports these API Level:
                                        
                                        Qt 6.6: Min API 26 (Android 8)
                                        Qt 6.8 MIn API 28 (Android 9)
                                        see QTBUG-124890
                                        Qt 6.6: Target API 33 (Android 13)
                                        Qt 6.7: Target API 34 (Android 14)
                                        
                                        1 Reply Last reply
                                        0
                                        • E Offline
                                          E Offline
                                          ekkescorner
                                          Qt Champions 2016
                                          wrote on 19 Aug 2024, 13:49 last edited by
                                          #80

                                          this is from one of my 6.7.1 apps:

                                          android.useAndroidX=true
                                          androidBuildToolsVersion=34.0.0
                                          androidCompileSdkVersion=android-34
                                          androidNdkVersion=26.1.10909125
                                          qtMinSdkVersion=26
                                          qtTargetAbiList=arm64-v8a
                                          qtTargetSdkVersion=34
                                          

                                          QMake or CMake - always the same for my projects

                                          BTW: some examples from create (update) Templates I did:
                                          https://ekkesapps.wordpress.com/qt-6-cmake/qtcreator-android-templates-2/

                                          ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                                          5.15 --> 6.8 https://t1p.de/ekkeChecklist
                                          QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                                          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