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 22.4k 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.
  • M Offline
    M Offline
    mzimmers
    wrote on 6 Jan 2024, 22:19 last edited by
    #48

    Using Android Studio's SDK Manager, I was able to install Android 13.0 (Tiramisu), and command-line tools 10:
    Screenshot 2024-01-06 141139.png

    Screenshot 2024-01-06 140903.png
    and now my Android settings in Creator are totally whack:
    Screenshot 2024-01-06 141805.png
    I'm going around in circles here. Any ideas are appreciated.

    J 2 Replies Last reply 7 Jan 2024, 00:55
    0
    • M mzimmers
      6 Jan 2024, 22:19

      Using Android Studio's SDK Manager, I was able to install Android 13.0 (Tiramisu), and command-line tools 10:
      Screenshot 2024-01-06 141139.png

      Screenshot 2024-01-06 140903.png
      and now my Android settings in Creator are totally whack:
      Screenshot 2024-01-06 141805.png
      I'm going around in circles here. Any ideas are appreciated.

      J Offline
      J Offline
      JoeCFD
      wrote on 7 Jan 2024, 00:55 last edited by
      #49

      @mzimmers the SDKs from Android SDK Manager are not in your kit yet. Click SDK Manager button to add them.

      M 1 Reply Last reply 7 Jan 2024, 02:53
      0
      • J JoeCFD
        7 Jan 2024, 00:55

        @mzimmers the SDKs from Android SDK Manager are not in your kit yet. Click SDK Manager button to add them.

        M Offline
        M Offline
        mzimmers
        wrote on 7 Jan 2024, 02:53 last edited by
        #50

        @JoeCFD it doesn't work - there's nothing in the package window to add when I've selected JDK 11.

        E 1 Reply Last reply 7 Jan 2024, 10:26
        0
        • M mzimmers
          7 Jan 2024, 02:53

          @JoeCFD it doesn't work - there's nothing in the package window to add when I've selected JDK 11.

          E Offline
          E Offline
          ekkescorner
          Qt Champions 2016
          wrote on 7 Jan 2024, 10:26 last edited by
          #51

          @mzimmers I'm using JDK 17 for Qt 5.15.15 and 6.6

          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
            6 Jan 2024, 22:19

            Using Android Studio's SDK Manager, I was able to install Android 13.0 (Tiramisu), and command-line tools 10:
            Screenshot 2024-01-06 141139.png

            Screenshot 2024-01-06 140903.png
            and now my Android settings in Creator are totally whack:
            Screenshot 2024-01-06 141805.png
            I'm going around in circles here. Any ideas are appreciated.

            J Offline
            J Offline
            JoeCFD
            wrote on 8 Jan 2024, 14:59 last edited by
            #52

            @mzimmers I am running Qt 6.6.1 on Linux with qtcreator 11.0.3 and do not have any issue with the settings.

            SDK path is not writable?

            M 1 Reply Last reply 8 Jan 2024, 15:36
            0
            • J JoeCFD
              8 Jan 2024, 14:59

              @mzimmers I am running Qt 6.6.1 on Linux with qtcreator 11.0.3 and do not have any issue with the settings.

              SDK path is not writable?

              M Offline
              M Offline
              mzimmers
              wrote on 8 Jan 2024, 15:36 last edited by
              #53

              @JoeCFD I'm running on Windows 11. According to the properties of my Sdk folder, it was partially read-only, but I changed that, and it didn't help.

              When I try to run the SCK manager, I get this error:
              Screenshot 2024-01-08 073403.png

              J 1 Reply Last reply 8 Jan 2024, 15:46
              0
              • M mzimmers
                8 Jan 2024, 15:36

                @JoeCFD I'm running on Windows 11. According to the properties of my Sdk folder, it was partially read-only, but I changed that, and it didn't help.

                When I try to run the SCK manager, I get this error:
                Screenshot 2024-01-08 073403.png

                J Offline
                J Offline
                JoeCFD
                wrote on 8 Jan 2024, 15:46 last edited by
                #54

                @mzimmers

                The error message indicates that you are trying to run a Java class file compiled with a higher version of the Java compiler than the version of the Java Runtime Environment (JRE) you have installed.

                In this case:

                Class file version 61.0 corresponds to Java 17.
                Class file version 55.0 corresponds to Java 11.
                

                ==============================================================
                Your installation is messed up.

                M 1 Reply Last reply 8 Jan 2024, 15:53
                0
                • J JoeCFD
                  8 Jan 2024, 15:46

                  @mzimmers

                  The error message indicates that you are trying to run a Java class file compiled with a higher version of the Java compiler than the version of the Java Runtime Environment (JRE) you have installed.

                  In this case:

                  Class file version 61.0 corresponds to Java 17.
                  Class file version 55.0 corresponds to Java 11.
                  

                  ==============================================================
                  Your installation is messed up.

                  M Offline
                  M Offline
                  mzimmers
                  wrote on 8 Jan 2024, 15:53 last edited by
                  #55

                  @JoeCFD said in Android app doesn't run:

                  Your installation is messed up.

                  Well, that's an understatement. From a terminal, I get this:

                  C:\Users\michael.zimmers>java -version
                  openjdk version "21.0.1" 2023-10-17 LTS
                  OpenJDK Runtime Environment Temurin-21.0.1+12 (build 21.0.1+12-LTS)
                  OpenJDK 64-Bit Server VM Temurin-21.0.1+12 (build 21.0.1+12-LTS, mixed mode, sharing)
                  

                  Is this not the same JRE instance that Creator is trying to use?

                  J 1 Reply Last reply 8 Jan 2024, 16:11
                  0
                  • M mzimmers
                    8 Jan 2024, 15:53

                    @JoeCFD said in Android app doesn't run:

                    Your installation is messed up.

                    Well, that's an understatement. From a terminal, I get this:

                    C:\Users\michael.zimmers>java -version
                    openjdk version "21.0.1" 2023-10-17 LTS
                    OpenJDK Runtime Environment Temurin-21.0.1+12 (build 21.0.1+12-LTS)
                    OpenJDK 64-Bit Server VM Temurin-21.0.1+12 (build 21.0.1+12-LTS, mixed mode, sharing)
                    

                    Is this not the same JRE instance that Creator is trying to use?

                    J Offline
                    J Offline
                    JoeCFD
                    wrote on 8 Jan 2024, 16:11 last edited by JoeCFD 1 Aug 2024, 16:26
                    #56

                    @mzimmers It is likely some java classes in Android/Sdk were built in Java 17 at the beginning. They were not rebuilt when you switched to Java 11.

                    Wait: you have JDK 21?

                    M 1 Reply Last reply 8 Jan 2024, 16:28
                    0
                    • J JoeCFD
                      8 Jan 2024, 16:11

                      @mzimmers It is likely some java classes in Android/Sdk were built in Java 17 at the beginning. They were not rebuilt when you switched to Java 11.

                      Wait: you have JDK 21?

                      M Offline
                      M Offline
                      mzimmers
                      wrote on 8 Jan 2024, 16:28 last edited by
                      #57

                      @JoeCFD said in Android app doesn't run:

                      Wait: you have JDK 21?

                      I have JDK 11, 17 and 21. I just don't know which one to use in my JDK/SDK/NDK/tools/JRE cocktail.

                      J 1 Reply Last reply 8 Jan 2024, 16:32
                      0
                      • M mzimmers
                        8 Jan 2024, 16:28

                        @JoeCFD said in Android app doesn't run:

                        Wait: you have JDK 21?

                        I have JDK 11, 17 and 21. I just don't know which one to use in my JDK/SDK/NDK/tools/JRE cocktail.

                        J Offline
                        J Offline
                        JoeCFD
                        wrote on 8 Jan 2024, 16:32 last edited by
                        #58

                        @mzimmers I guess you can not have all of them. Remove 17 and 21 and SDK. Reinstall SDK if you use Java 11 which is recommended by Android for Andorid 13.

                        @ekkescorner wrote he is ok with 17. I have not tried it. You can try it out as well.

                        M 1 Reply Last reply 8 Jan 2024, 16:45
                        0
                        • J JoeCFD
                          8 Jan 2024, 16:32

                          @mzimmers I guess you can not have all of them. Remove 17 and 21 and SDK. Reinstall SDK if you use Java 11 which is recommended by Android for Andorid 13.

                          @ekkescorner wrote he is ok with 17. I have not tried it. You can try it out as well.

                          M Offline
                          M Offline
                          mzimmers
                          wrote on 8 Jan 2024, 16:45 last edited by
                          #59

                          @JoeCFD but according to JKSH's post this is going to create a mismatch.

                          J 1 Reply Last reply 8 Jan 2024, 16:58
                          0
                          • M mzimmers referenced this topic on 8 Jan 2024, 16:45
                          • M mzimmers
                            8 Jan 2024, 16:45

                            @JoeCFD but according to JKSH's post this is going to create a mismatch.

                            J Offline
                            J Offline
                            JoeCFD
                            wrote on 8 Jan 2024, 16:58 last edited by
                            #60

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

                            M 1 Reply Last reply 12 Jan 2024, 00:03
                            0
                            • 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
                                        • mzimmersM 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.

                                          JoeCFDJ Offline
                                          JoeCFDJ 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

                                          57/87

                                          8 Jan 2024, 16:28

                                          • Login

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