There are two solutions to solve Error: Could not determine java version from '11.0.8'.
Method 1: downgrade Android Studio and use the historical version of Android Studio environment;
Method 2: upgrade Gradle version;
1. Error reporting information
Open an old project and report the following error:
Could not determine java version from '11.0.8'.
The project uses Gradle version which is incompatible with Studio running on Java 10 or newer.
See details at https://github.com/gradle/gradle/issues/8431
Possible solution:
- Upgrade Gradle wrapper to 4.8.1 version and re-import the project
Select the “menu bar/file/Project Structure” option,
Check that the Android Gradle plug-in version of the Android project is 3.2.0 and the Gradle version is 4.6. This is the version used a few years ago. At present, the project cannot be compiled using the latest Android studio;
2. Solution
Select the menu bar/file/project structure option,
In the pop-up project structure dialog box, update the Android gradle plug-in version to 4.2.1 and the gradle plug-in version to 6.7.1;
Read More:
- Android studio version 3.0 import version 2.2.2 error Error:This Gradle plugin requires Studio 3.0 minimum
- [Solved] Android Studio Error: The binary version of its metadata is 1.5.1, expected version is 1.1.15.
- [Solved] Android Studio Compile Error: Invalid main APK outputs : EarlySyncBuildOutput
- [Solved] Android Studio Compile Error: Execution failed for task ‘:APP_MIDI:lintVitalRelease‘.
- Android studio configurate intent-filter and compile error [Solved]
- Android Studio compile error: build tools is corrupt [Solved]
- [Solved] Android Studio Error: AAPT: error: file failed to compile
- [Solved] Android Studio Compile error: Cannot use connection to Gradle distribution . as it has been stopped.
- [Solved] Android Studio Start Error: Missing essential plugin: org.jetbrains.android Please reinstall Android
- Android studio does not prompt error messages [How to Solve]
- Android Studio: Gradle project sync failed [How to Solve]
- [Solved] Android Studio Error:SDK location not found.
- Flutter android studio runs gradle build error: Could not resolve all artifacts for configuration’:classpath’.
- [Solved] Compile Error: AAPT: error: resource android:attr/lStar not found
- [Solved] Windows Android Studio Cannot Start Error: Internal error. Please refer to https://code.google.com/p/android/issue
- Android Studio HAXM is not installed [How to Solve]
- [Solved] OpenCV ERROR: The minSdk version should not be declared in the android manifest file
- [Solved] Android Studio Error:This view is not constrained, it only has designtime positions
- [Solved] Android Studio 4 Error: The application could not be installed: INSTALL_FAILED_OLDER_SDK
- [Solved] Android Studio Error: ERROR: Cause: executing external native build for cmake