Gradle error building for Android
Solved
Mobile and Embedded
-
I'm trying to build for Android but I obtain the error:
Starting a Gradle Daemon (subsequent builds will be faster) 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)
If I remove gradle, buring build qtcreator download an old version
Downloading https://services.gradle.org/distributions/gradle-5.6.4-bin.zip
How can i resolve? Is there a way to force qtcreator to use the latest gradle version?
https://services.gradle.org/distributions/ -
In order to build an Android app using Debian 12 and the last qtcreator I have to:
- switch between jdk 12 and 17
- remove to recreate the file pro.user
- close and reopen qtcreator
After that qtcreator can builds a valid android app. I have to do this each time I want to open a project.
-
Go check my previous posts about Android. I guess compatibility is required in Android build among gradle, jdk and Android versions. You may not be able to choose any version of these packages for build of Android projects. Gradle version in Qt installation is often good enough and may not be related to QtCreator.
-
In order to build an Android app using Debian 12 and the last qtcreator I have to:
- switch between jdk 12 and 17
- remove to recreate the file pro.user
- close and reopen qtcreator
After that qtcreator can builds a valid android app. I have to do this each time I want to open a project.
-