Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Develop for android java issues
QtWS25 Last Chance

Develop for android java issues

Scheduled Pinned Locked Moved Solved General and Desktop
quickandroidmobile
28 Posts 5 Posters 7.4k 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.
  • P Offline
    P Offline
    Phips04
    wrote on 11 Oct 2020, 18:15 last edited by
    #1

    Hi everyone,
    I'm currently working on an mobile app for android.
    I did all the setup, as described (installed jdk and ndk / android sdk).
    Qt Creator recognizes my mobile correctly, when its connected to the development pc.
    When I wanted to deploy the app in my mobile (running android 4.4.2), the process threw up several errors,
    all of them related to java.

    "java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
    at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)...".

    Followed by more than 100 lines of errors "at...".
    By the way, openSSL is not set up (it was marked as optional).

    Hope there is someone to help me, thanks

    J 1 Reply Last reply 12 Oct 2020, 04:40
    0
    • P Phips04
      15 Oct 2020, 08:49

      I meant qt Creator says Java settings are ok.
      I didn't remember that version 8 is the recommended one, installed 15.
      I will replace it by 8 now

      K Offline
      K Offline
      KroMignon
      wrote on 15 Oct 2020, 09:05 last edited by KroMignon
      #24

      @Phips04 said in Develop for android java issues:

      I didn't remember that version 8 is the recommended one, installed 15.

      Yes, it is no clearly defined ==> https://doc.qt.io/qt-5/android-building.html.
      JDK 8, still recommended for best compatibility, but starting with Qt 5.15 JDK 11 could be used.

      Side note: if you search on internet java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7, all matches you will found will clearly detail the issue. The gradle version is not compatible with the selected JDK.
      For Qt 5.15, the used gradle version is 5.6.4 (just check in <QT_DIR>/5.15.0/android/src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.properties)

      It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

      1 Reply Last reply
      2
      • P Phips04
        11 Oct 2020, 18:15

        Hi everyone,
        I'm currently working on an mobile app for android.
        I did all the setup, as described (installed jdk and ndk / android sdk).
        Qt Creator recognizes my mobile correctly, when its connected to the development pc.
        When I wanted to deploy the app in my mobile (running android 4.4.2), the process threw up several errors,
        all of them related to java.

        "java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
        at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)...".

        Followed by more than 100 lines of errors "at...".
        By the way, openSSL is not set up (it was marked as optional).

        Hope there is someone to help me, thanks

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 12 Oct 2020, 04:40 last edited by
        #2

        @Phips04 said in Develop for android java issues:

        running android 4.4.2

        Android 4.4.2?! Do you really have to use such an old version?
        What Qt version do you use?
        To build for Android 4.4 you need Qt 5.12 or older.
        See https://doc.qt.io/archives/qt-5.13/android.html and https://doc.qt.io/qt-5.12/android.html

        1 Reply Last reply
        1
        • K Offline
          K Offline
          KroMignon
          wrote on 12 Oct 2020, 06:00 last edited by
          #3

          @Phips04 said in Develop for android java issues:

          When I wanted to deploy the app in my mobile (running android 4.4.2), the process threw up several errors,
          all of them related to java.

          I think your Android version is too old, according to Qt wiki, Android API level 18 (Android 4.3) is required and API 21 (Android 5.0) is recommended.

          It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

          1 Reply Last reply
          1
          • P Offline
            P Offline
            Phips04
            wrote on 12 Oct 2020, 18:08 last edited by
            #4

            My mobile is a samsung galaxy S3 Neo running android 4.4.2, and I'm using QT 5.15.1.
            However it told me, that the build process failed because of java. I just copied the details:

            java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
            at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)
            at org.codehaus.groovy.reflection.GroovyClassValueFactory.<clinit>(GroovyClassValueFactory.java:35)
            at org.codehaus.groovy.reflection.ClassInfo.<clinit>(ClassInfo.java:109)
            at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:95)
            at org.codehaus.groovy.reflection.ReflectionCache.<clinit>(ReflectionCache.java:39)
            at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerMethods(MetaClassRegistryImpl.java:209)
            at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:107)
            at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:85)
            at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)
            at org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:86)
            at groovy.lang.GroovyObjectSupport.getDefaultMetaClass(GroovyObjectSupport.java:59)
            at groovy.lang.GroovyObjectSupport.<init>(GroovyObjectSupport.java:32)
            at org.gradle.internal.extensibility.DefaultExtraPropertiesExtension.<init>(DefaultExtraPropertiesExtension.java:29)
            at org.gradle.internal.extensibility.DefaultConvention.<init>(DefaultConvention.java:48)
            at org.gradle.api.internal.plugins.DefaultConvention.<init>(DefaultConvention.java:28)
            at org.gradle.internal.extensibility.ExtensibleDynamicObject.<init>(ExtensibleDynamicObject.java:60)
            at org.gradle.internal.instantiation.MixInExtensibleDynamicObject.<init>(MixInExtensibleDynamicObject.java:34)
            at org.gradle.initialization.DefaultSettings_Decorated.getAsDynamicObject(Unknown Source)
            at org.gradle.initialization.SettingsFactory.createSettings(SettingsFactory.java:58)
            at org.gradle.initialization.ScriptEvaluatingSettingsProcessor.process(ScriptEvaluatingSettingsProcessor.java:61)
            at org.gradle.initialization.PropertiesLoadingSettingsProcessor.process(PropertiesLoadingSettingsProcessor.java:38)
            at org.gradle.initialization.SettingsEvaluatedCallbackFiringSettingsProcessor.process(SettingsEvaluatedCallbackFiringSettingsProcessor.java:34)
            at org.gradle.initialization.RootBuildCacheControllerSettingsProcessor.process(RootBuildCacheControllerSettingsProcessor.java:36)
            at org.gradle.initialization.BuildOperationSettingsProcessor$2.call(BuildOperationSettingsProcessor.java:50)
            at org.gradle.initialization.BuildOperationSettingsProcessor$2.call(BuildOperationSettingsProcessor.java:47)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
            at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
            at org.gradle.initialization.BuildOperationSettingsProcessor.process(BuildOperationSettingsProcessor.java:47)
            at org.gradle.initialization.DefaultSettingsLoader.findSettingsAndLoadIfAppropriate(DefaultSettingsLoader.java:104)
            at org.gradle.initialization.DefaultSettingsLoader.findAndLoadSettings(DefaultSettingsLoader.java:45)
            at org.gradle.initialization.SettingsAttachingSettingsLoader.findAndLoadSettings(SettingsAttachingSettingsLoader.java:35)
            at org.gradle.internal.composite.CommandLineIncludedBuildSettingsLoader.findAndLoadSettings(CommandLineIncludedBuildSettingsLoader.java:34)
            at org.gradle.internal.composite.ChildBuildRegisteringSettingsLoader.findAndLoadSettings(ChildBuildRegisteringSettingsLoader.java:47)
            at org.gradle.internal.composite.CompositeBuildSettingsLoader.findAndLoadSettings(CompositeBuildSettingsLoader.java:35)
            at org.gradle.initialization.DefaultSettingsPreparer.prepareSettings(DefaultSettingsPreparer.java:36)
            at org.gradle.initialization.BuildOperatingFiringSettingsPreparer$LoadBuild.doLoadBuild(BuildOperatingFiringSettingsPreparer.java:59)
            at org.gradle.initialization.BuildOperatingFiringSettingsPreparer$LoadBuild.run(BuildOperatingFiringSettingsPreparer.java:54)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
            at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
            at org.gradle.initialization.BuildOperatingFiringSettingsPreparer.prepareSettings(BuildOperatingFiringSettingsPreparer.java:42)
            at org.gradle.initialization.DefaultGradleLauncher.prepareSettings(DefaultGradleLauncher.java:190)
            at org.gradle.initialization.DefaultGradleLauncher.doClassicBuildStages(DefaultGradleLauncher.java:134)
            at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:126)
            at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:106)
            at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.java:60)
            at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.java:57)
            at org.gradle.internal.invocation.GradleBuildController$3.create(GradleBuildController.java:85)
            at org.gradle.internal.invocation.GradleBuildController$3.create(GradleBuildController.java:78)
            at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:189)
            at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:40)
            at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:78)
            at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:57)
            at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
            at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
            at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:63)
            at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
            at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:39)
            at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:51)
            at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:45)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
            at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
            at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
            at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:45)
            at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:50)
            at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:47)
            at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:78)
            at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:47)
            at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:31)
            at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:42)
            at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:28)
            at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:78)
            at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:52)
            at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:59)
            at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:36)
            at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.java:68)
            at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.java:38)
            at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:37)
            at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:26)
            at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
            at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
            at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:60)
            at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:32)
            at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:55)
            at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:41)
            at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:48)
            at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:32)
            at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:56)
            at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:212)
            at org.gradle.launcher.cli.DefaultCommandLineActionFactory$ParseAndBuildAction.execute(DefaultCommandLineActionFactory.java:404)
            at org.gradle.launcher.cli.DefaultCommandLineActionFactory$ParseAndBuildAction.execute(DefaultCommandLineActionFactory.java:376)
            at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:38)
            at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:23)
            at org.gradle.launcher.cli.DefaultCommandLineActionFactory$WithLogging.execute(DefaultCommandLineActionFactory.java:369)
            at org.gradle.launcher.Main.doAction(Main.java:35)
            at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:564)
            at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
            at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
            at org.gradle.launcher.GradleMain.main(GradleMain.java:31)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:564)
            at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:31)
            at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108)
            at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
            FAILURE: Build failed with an exception.

            • What went wrong:
              Could not initialize class org.codehaus.groovy.reflection.ReflectionCache
            • 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
              BUILD FAILED in 2s

            I'm not sure, but maybe its not android itself being responsible for the problems.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on 12 Oct 2020, 18:10 last edited by
              #5

              @Phips04 said in Develop for android java issues:

              I'm not sure, but maybe its not android itself being responsible for the problems.

              Did you read the post from @jsulm ?

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              2
              • P Offline
                P Offline
                Phips04
                wrote on 13 Oct 2020, 10:22 last edited by Phips04
                #6
                This post is deleted!
                J J 2 Replies Last reply 13 Oct 2020, 11:11
                0
                • P Phips04
                  13 Oct 2020, 10:22

                  This post is deleted!

                  J Offline
                  J Offline
                  J.Hilk
                  Moderators
                  wrote on 13 Oct 2020, 11:11 last edited by
                  #7

                  @Phips04 It does not matter at all what device you attach to your PC,

                  what does matter is what minimal android version you set inside your manifest. Did you change it there ?


                  Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                  Q: What's that?
                  A: It's blue light.
                  Q: What does it do?
                  A: It turns blue.

                  1 Reply Last reply
                  1
                  • P Phips04
                    13 Oct 2020, 10:22

                    This post is deleted!

                    J Offline
                    J Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on 13 Oct 2020, 11:17 last edited by
                    #8
                    This post is deleted!
                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      Phips04
                      wrote on 13 Oct 2020, 15:25 last edited by
                      #9

                      @J-Hilk Which file is that?

                      Do you mean the *.pro file?

                      K 1 Reply Last reply 13 Oct 2020, 15:56
                      0
                      • P Phips04
                        13 Oct 2020, 15:25

                        @J-Hilk Which file is that?

                        Do you mean the *.pro file?

                        K Offline
                        K Offline
                        KroMignon
                        wrote on 13 Oct 2020, 15:56 last edited by
                        #10

                        @Phips04 said in Develop for android java issues:

                        Do you mean the *.pro file?

                        No, the Android manifest ==> AndroidManifest.xml
                        Double click on it in QtCreator to start the editor:
                        11469230-f742-477d-b2a4-dac3c72d3219-image.png

                        It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                        1 Reply Last reply
                        1
                        • P Offline
                          P Offline
                          Phips04
                          wrote on 13 Oct 2020, 18:46 last edited by
                          #11

                          QTAndroid.jpg

                          This is how it actually looks like, the option to set the sdk is disabled.
                          I made sure, that the sdk's I want to use are installed. (Sry I'm new to qt)

                          K 1 Reply Last reply 13 Oct 2020, 20:05
                          0
                          • P Phips04
                            13 Oct 2020, 18:46

                            QTAndroid.jpg

                            This is how it actually looks like, the option to set the sdk is disabled.
                            I made sure, that the sdk's I want to use are installed. (Sry I'm new to qt)

                            K Offline
                            K Offline
                            KroMignon
                            wrote on 13 Oct 2020, 20:05 last edited by
                            #12

                            @Phips04 Did you check QtCreator Android configuration?

                            In Tools/Option/Devices, select tab "Android":
                            9acabd97-323f-4a6a-8f1e-36521c90789c-image.png

                            It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                            1 Reply Last reply
                            0
                            • P Offline
                              P Offline
                              Phips04
                              wrote on 14 Oct 2020, 15:03 last edited by
                              #13

                              Java and android settings are ok, in the android settings there is no "ndk-bundle". But the second entry exists, as I mentioned OpenSSL is not set

                              K 1 Reply Last reply 14 Oct 2020, 15:37
                              0
                              • P Phips04
                                14 Oct 2020, 15:03

                                Java and android settings are ok, in the android settings there is no "ndk-bundle". But the second entry exists, as I mentioned OpenSSL is not set

                                K Offline
                                K Offline
                                KroMignon
                                wrote on 14 Oct 2020, 15:37 last edited by
                                #14

                                @Phips04 said in Develop for android java issues:

                                in the android settings there is no "ndk-bundle"

                                This is your problem, ndk-bundle is mandatory for Qt!

                                Extract from the Qt documentation:
                                Use the sdkmanager command line tool to update the packages list and then install the essential packages:

                                cd <ANDROID_SDK_ROOT>/tools/bin/
                                ./sdkmanager --update
                                ./sdkmanager --install "platform-tools" "platforms;android-29" "build-tools;29.0.2" "ndk-bundle"
                                

                                It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                                1 Reply Last reply
                                0
                                • P Offline
                                  P Offline
                                  Phips04
                                  wrote on 14 Oct 2020, 17:51 last edited by
                                  #15

                                  Ok, I did it, but the cmd line reported some errors, and there was no effect in qt creator.
                                  QTAndroid2.jpg

                                  K 1 Reply Last reply 14 Oct 2020, 20:44
                                  0
                                  • P Phips04
                                    14 Oct 2020, 17:51

                                    Ok, I did it, but the cmd line reported some errors, and there was no effect in qt creator.
                                    QTAndroid2.jpg

                                    K Offline
                                    K Offline
                                    KroMignon
                                    wrote on 14 Oct 2020, 20:44 last edited by
                                    #16

                                    @Phips04 This seems to be a well know issue with Android:

                                    • https://stackoverflow.com/questions/60730615/sdkmanager-warning-could-not-create-setting-java-lang-illegalargumentexcepti
                                    • https://medium.com/@s89707192/if-you-have-the-issue-652c7c1ad5d0

                                    You can try:

                                    cd <ANDROID_SDK_ROOT>\tools\bin\
                                    sdkmanager --sdk_root="<ANDROID_SDK_ROOT>" --update
                                    sdkmanager --sdk_root="<ANDROID_SDK_ROOT>" --install "platform-tools" "platforms;android-29" "build-tools;29.0.2" "ndk-bundle"
                                    

                                    It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                                    1 Reply Last reply
                                    0
                                    • P Offline
                                      P Offline
                                      Phips04
                                      wrote on 15 Oct 2020, 06:35 last edited by
                                      #17

                                      It worked this way, the bundle is installed now, but I still can't change the minimal android version

                                      J K 2 Replies Last reply 15 Oct 2020, 06:50
                                      0
                                      • P Phips04
                                        15 Oct 2020, 06:35

                                        It worked this way, the bundle is installed now, but I still can't change the minimal android version

                                        J Offline
                                        J Offline
                                        J.Hilk
                                        Moderators
                                        wrote on 15 Oct 2020, 06:50 last edited by
                                        #18

                                        @Phips04 do it by hand than, open the android manifest.xml in a text editor
                                        and change the version there
                                        2fb9ec48-f65e-4d1d-97a4-2689c7454849-image.png


                                        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                                        Q: What's that?
                                        A: It's blue light.
                                        Q: What does it do?
                                        A: It turns blue.

                                        1 Reply Last reply
                                        0
                                        • P Offline
                                          P Offline
                                          Phips04
                                          wrote on 15 Oct 2020, 07:36 last edited by
                                          #19

                                          The .xml can be evaluated and I set the entries. Min sdk is 21 (android 5) and target is 27 (android 8.1). The error still is the same

                                          1 Reply Last reply
                                          0
                                          • P Phips04
                                            15 Oct 2020, 06:35

                                            It worked this way, the bundle is installed now, but I still can't change the minimal android version

                                            K Offline
                                            K Offline
                                            KroMignon
                                            wrote on 15 Oct 2020, 07:41 last edited by
                                            #20

                                            @Phips04 said in Develop for android java issues:

                                            It worked this way, the bundle is installed now, but I still can't change the minimal android version

                                            What do you mean with "you can't"? Is the dropdown combobox grayed out or is the list empty?
                                            Do you have restart Qt Creator after updating SDK root?

                                            It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                                            1 Reply Last reply
                                            0

                                            4/28

                                            12 Oct 2020, 18:08

                                            topic:navigator.unread, 24
                                            • Login

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