[Solved] Android Studio Compile Error: Could not determine java version from ‘11.0.8‘.

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: