Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

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

Closed
kimonic opened this issue Feb 25, 2021 · 4 comments
Closed

Comments

@kimonic
Copy link

kimonic commented Feb 25, 2021

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 kimonic changed the title Build file 'E:\work\app\jetpickdemo\android-dev-challenge-compose\app\build.gradle' line: 2 Build file '...\android-dev-challenge-compose\app\build.gradle' line: 2 Feb 25, 2021
@GuilhE
Copy link

GuilhE commented Feb 25, 2021

possible duplicate #1

@OYBCBC
Copy link

OYBCBC commented Mar 1, 2021

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

@issamux
Copy link

issamux commented Mar 22, 2021

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
Copy link

issamux commented Mar 22, 2021

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,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants