Problems you may encounter when importing old Android projects Unsupported Java. Your build is currently configured to use Java 17.0.6 and Gr

The following problems occur when importing old projects

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

Unsupported Java.
Your build is currently configured to use Java 17.0.6 and Gradle 5.4.1.
Possible solution:
Upgrade Gradle wrapper to 7.2 version and re-import the project

This means that the current Java17.0.6 needs to be upgraded to 7.2.

Originally, the project execution was not Java 17, and a higher Java version was used locally, so gradle needed to be updated for synchronization.

Of course, you can update gradle, but this means there are many problems that need to be corrected later. But why bother? I just wanted to run the project to see the effect, but it turned out that I still had to change the content, and in the end I probably didn’t know whether it could run.

Therefore, depending on the conditions, you can perform some operations.

solution

can set a lower Java version to cater to Gradle 5.4.1.
——>File——>Project Structure——>SDK location——>Gradle Setting——>Gradle SDK——>Choose a 1.8 version to download and run Bar.

Guess you like

Origin blog.csdn.net/ganshenml/article/details/132819477