You can use cmd + ; for Mac or Ctrl + Alt + Shift + S for Windows/Linux to pull up the Project Structure dialog. In there, you can set the JDK location as well as the Android SDK location.
To get your JDK location, run /usr/libexec/java_home -v 11
in terminal. Send 1.7 for Java 7, 1.8 for Java 8, or 11 for Java 11.
More Related Contents:
- com.android.build.transform.api.TransformException
- Is it possible to declare a variable in Gradle usable in Java?
- Execution Failed for task :app:compileDebugJavaWithJavac in Android Studio
- javax.* cannot be imported in my Android app?
- Gradle – What is a non-zero exit value and how do I fix it?
- Transitive dependencies not resolved for aar library using gradle
- Ionic build Android error when downloading Gradle
- Failed to resolve: com.google.firebase:firebase-core:16.0.1
- Import Google Play Services library in Android Studio
- How to download older google play services?
- ‘:app:lintVitalRelease’ error when generating signed apk
- JCenter deprecation; impact on Gradle and Android
- How to include JAR dependency into an AAR library
- How to remove specific permission when build Android app with gradle?
- Difference between google() and maven { url ‘https://maven.google.com’ }
- :app:dexDebug ExecException finished with non-zero exit value 2
- What does transitive = true in Gradle exactly do (w.r.t. crashlytics)?
- How do I resolve “Duplicate files copied in APK META-INF/*”
- java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex in Android Studio 3.0 [closed]
- What does ‘->’ (arrow) mean in gradle’s dependency graph?
- unrecognized Attribute name MODULE (class com.sun.tools.javac.util.SharedNameTable$NameImpl)
- Error: Gradle: execution failed for task ‘:app:preDexDebug’
- Failed to import new Gradle project: failed to find Build Tools revision *.0.0
- Android Studio Build gradle OutOfMemoryError
- Failed to resolve: com.google.android.gms:play-services in IntelliJ Idea with gradle
- Error:Timeout waiting to lock buildscript class cache for build file when change minSdkVersion
- Importing Facebook library in Android Studio: Could not find property ‘ANDROID_BUILD_SDK_VERSION’
- Gradle – download dependencies, lock versions and update dependencies manually
- Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_151 contains a valid JDK installation
- Error:Could not initialize class com.android.sdklib.repositoryv2.AndroidSdkHandler