android-dev-challenge-compose icon indicating copy to clipboard operation
android-dev-challenge-compose copied to clipboard

Build file '...\android-dev-challenge-compose\app\build.gradle' line: 2

Open kimonic opened this issue 3 years ago • 4 comments

An exception occurred applying plugin request [id: 'com.android.application']

Failed to apply plugin 'com.android.internal.application'. java.lang.NoSuchMethodException: java.lang.invoke.MethodHandles.privateLookupIn(java.lang.Class, java.lang.invoke.MethodHandles$Lookup)

kimonic avatar Feb 25 '21 07:02 kimonic

possible duplicate #1

GuilhE avatar Feb 25 '21 10:02 GuilhE

it said "Getting started Copy this repository by pressing the "Use this template" button in Github. Clone your repository and open it in the latest Android Studio (Canary build)."

use the latest Android Studio(Canary build) version, i can build it successfully

OYBCBC avatar Mar 01 '21 08:03 OYBCBC

when building project :

./gradlew build --stacktrace

i got this exception : exception occurred applying plugin request [id: 'com.android.application']

Failed to apply plugin 'com.android.internal.application'. Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. You can try some of the following options:

  • changing the IDE settings.
  • changing the JAVA_HOME environment variable.
  • changing org.gradle.java.home in gradle.properties.

Gradle plugin requires Java 11 to run.?!!!

issamux avatar Mar 22 '21 01:03 issamux

Solved the problem by :

  • Ofc using the latest Android Studio Artic Fox (Canary build)
  • Use Android studio Artic Fox Embeded JDK (openjdk version "11.0.8") or download and replace 1.8 java by OpenJdk 11.

All are good and all compile now Voila,

issamux avatar Mar 22 '21 01:03 issamux