Posts

Showing posts with the label android-gradle-plugin

Android Studio Gradle: Please remove usages of `jcenter()` Maven repository from your build scripts / JCenter is at end of life

9 3 In Android Studio 4.2 there is a warning: buildscript { ext.kotlin_version = '1.5.0' repositories { google() jcenter() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:4.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } allprojects { repositories { google() jcenter() mavenCentral() } } If I remove jcenter() then it can't find some dependencies of my app project: > Could not find org.koin:koin-core:2.0.1. Required by: project :app > Could not find org.koin:koin-androidx-scope:2.0.1. Required by: project :app > Could not find org.koin:koin-and...

Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8

20 I download the newest Android Studio, I want to run the Android Jetpack Compose Project, But when I run , I got the error: > 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`. I already download Java 11, And add java 11 in gradle.properties. org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk-11.0.10.jdk/Contents/Home The JAVA_HOME shows Java 11, But I run, It doesn't work, /Library/Java/JavaVirtualMachines/jdk-11.0.10.jdk/Contents/Home How should I d...