Press Win X, press "System", and enter "va". ( A short way: run cmd with administrative rights and write: setx /M JAVA_HOME "C:\Program Files\Java\jdk-11.0.11", and then restart Android Studio) I tried to change Windows system variables and changed JAVA_HOME. Then I changed the Java path in Settings (see the accepted answer), but it didn't help. I opened Project Structure (menu File → Project Structure) and selected Java 11, but it didn't help even after a restart of Android Studio. I got this error when I started gradlew ktlintFormat in the Terminal of Arctic Fox build. Implementation 'androidx.activity:activity-compose:1.3.0-alpha02'ĪndroidTestImplementation ':junit:1.1.2'ĪndroidTestImplementation ':espresso-core:3.3.0'ĪndroidTestImplementation ":ui-test-junit4:$compose_version" Implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.0' Implementation ":ui-tooling:$compose_version" ![]() Implementation ":material:$compose_version" Implementation 'androidx.appcompat:appcompat:1.2.0' KotlinCompilerExtensionVersion compose_version TargetCompatibility JavaVersion.VERSION_11 SourceCompatibility JavaVersion.VERSION_11 ![]() ProguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' My gradle-wrapper.properties distributionUrl=https\:///distributions/gradle-6.8.2-bin.zipīadle classpath classpath ":gradle:7.0.0-alpha13"Ĭlasspath ":kotlin-gradle-plugin:1.4.31" ![]() ![]() Library/Java/JavaVirtualMachines/jdk-11.0.10.jdk/Contents/Home The JAVA_HOME shows Java 11, but when I run, it doesn't work. =/Library/Java/JavaVirtualMachines/jdk-11.0.10.jdk/Contents/Home I already downloaded Java 11 and added Java 11 in gradle.properties. changing the JAVA_HOME environment variable. You can try some of the following options: > Android Gradle plugin requires Java 11 to run. I downloaded the newest Android Studio, and I wanted to run the Android Jetpack Compose Project, but when I ran it, I got the error: > Failed to apply plugin ''.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |