Could not determine java version from '11.0.10' - flutter

I am trying to run a music player which I got from github. I am getting this error while running it.
Could not determine java version from '11.0.10'.
Please help me solve it.
This is my graddle-wrapper properties file:-
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

Related

Could not open settings generic class cache for settings file Flutter

When I clone the project from GitHub and execute the program it throws this error
Please help all thanks
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 61
"Unsupported class file major version 61" indicates java 17, which is used by Gradle.
https://stackabuse.com/bytes/fix-java-error-unsupported-class-file-major-version-63/
This indicates major class version and corresponding Java versions.
https://docs.gradle.org/7.3/release-notes.html
Per this link, Java 17 support was added circa Gradle 7.3, so either upgrade to a more recent version of Gradle, or change your settings to use an earlier version of Java (such as JAVA_HOME if using the CLI).
If you run flutter doctor, you probably will see:
[!] Android Studio (version 2022.1)
✗ Unable to find bundled Java version.
https://github.com/flutter/flutter/issues/118502 seems to be the latest issue in which this crops up. https://github.com/flutter/flutter/issues/106674 notes they reverted a buggy change, but it hasn't hit stable yet, so you'll have to symlink the bundled JRE folder as a workaround til the next AS update.
e.g. for mac, you can use:
cd /Applications/AndroidStudio.app/Contents
ln -s jbr jre

Execution failed for task ':share:compileDebugJavaWithJavac'

I am using share: ^0.6.4+3 in my project but when I launch my project on my emulator, I am encountering:
Execution failed for task ':share:compileDebugJavaWithJavac'.
> java.io.FileNotFoundException: /home/chinkysight/Desktop/Pecha/build/share/intermediates/annotation_processor_list/debug/annotationProcessors.json (No such file or directory)
I tried downgrading the version, but it wasn't helpful :(
java.io.FileNotFoundException: /home/chinkysight/Desktop/Pecha/build/share/intermediates/annotation_processor_list/debug/annotationProcessors.json (No such file or directory)
you can delete your .gradle folder and rebuild project again or you can update your gradle version in gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
change the value of the gradle version to the latest version
Try deleting the android/.gradle, android/build, android/app/build. This is the only thing that worked for me.
Then open Android Studio -> File-> Invalidate Caches/Restart

Ionic App - build fails with "Minimum supported Gradle version is 4.4"

This is an Ionic Cordova project. I haven't touched in in a while but I came back to it now and when I run
ionic cordova build android
I get the following error:
Minimum supported Gradle version is 4.4. Current version is 4.1. If using
the gradle wrapper, try editing the distributionUrl in
C:\projects\ghost\gradle\wrapper\gradle-wrapper.properties to gradle-4.4-
all.zip
So I did that and had my gradle.properties file looking like this:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-
all.zip
But the build still fails and the properties file reverts to have 4.1 listed in it.
I have Gradle 4.9 installed and added to the path but that didn't work either.
Windows 10 Machine.
UPDATE:
I tried changing the cordova build script in GradleBuilder.js where it referenced gradle 4.1 to have gradle-4.4-all instead but the result was the same.
Thanks for any input.
Steve
upgrade all your Sdk and do:
ionic cordova platform rm android
ionic cordova platform add android#7.1.1 or latest
this will allow u to correct the gradle problem since it will update the gradle automatic

Issue with newly downloaded Android Studio 3.0 Canary 8

What should I edit in build.gradle or wrapper file to solve this?
My build.gradle file
build.gradle
My gradle-wrapper.properties file -
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-milestone-1-all.zip

Failed to apply plugin in android studio

I am working on an app its work good. after i apply external plugin that return error Failed to apply plugin .
my build tool version 2.2.3
and compile version 24
Unfortunately, the suggestion of G.K. did not work!
Please run the following command in your terminal:
.gradlew clean --refresh-dependencies
This will grap the newest version of the Calldorado plugin that is causing this error. The newest version has a fix in it.