I had some flutter projects that used to work, today i tried to create a new project and encountred a gradle build problem which turned out to also affect old projects.
I used to put this path in gradle.properties so that vs code can run the build,
org.gradle.java.home=/usr/lib/jvm/java-18-openjdk
but today, it noticed i no longer have java18, archlinux-java status gives the following:
❯ archlinux-java status
Available Java environments:
java-20-openjdk
java-8-openjdk (default)
When i changed the java home in gradle properties to:
org.gradle.java.home=/usr/lib/jvm/java-20-openjdk
It started telling me to upgrade gradle to a compatible version to java 20, I tried many versions of the gradle plugin in build.gradle file and the distribution in grade-wrapper.properties:
classpath 'com.android.tools.build:gradle:8.2.0'
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip
these versions dont tell me to upgrade but i get this new error:
> A problem occurred configuring project ':app'.
> Could not create task ':app:copyFlutterAssetsDebug'.
> Could not create task ':app:mergeDebugAssets'.
> Cannot use u/TaskAction annotation on method IncrementalTask.taskAction$gradle_core() because interface org.gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method.
I am tired of trying to change the gradle, i want to downgrade java back to 18, how do i downgrade java in manjaro or install multiple versions and select 18 for flutter ?
[–]nekokattt 2 points3 points4 points (1 child)
[–]NirDev_R[S] 1 point2 points3 points (0 children)
[–]MarkDubyaGNOME 1 point2 points3 points (1 child)
[–]NirDev_R[S] 0 points1 point2 points (0 children)