After upgrading IntelliJ IDEA to version 2021.1 (Ultimate) it fails to load gradle projects. It displays a message:
The Jdk installation is invalid.
Selected Jdk location is C:/Program Files/Java/jdk-11.0.3.
Select a JDK from the File System
Download JDK 8
The problem is that when I click "Select a JDK from the File System", a window with "Android SDK location" and "Android NDK location" appears. The projects are not for Android, so why is the IDE asking for Android libraries? And how to fix it?
(OS: Windows 10)
If I'm already a user of IntelliJ IDEA, do I need to switch to Android Studio for Android development? No. Android Studio is focused specifically on Android development and provides streamlined environment and project setup, but otherwise all of its features are available in IntelliJ IDEA.
IntelliJ IDEA contains all the features found in Android Studio. Setup for Android development is, however, a bit more involved since it does not include the Android SDK by default.
In the Gradle tool window, right-click a linked project. From the context menu, select Open Gradle config F4 . IntelliJ IDEA navigates to the appropriate Gradle configuration file and the related build.
To develop applications in IntelliJ IDEA, you need a Java SDK (JDK). A JDK is a software package that contains libraries, tools for developing and testing Java applications (development tools), and tools for running applications on the Java platform (Java Runtime Environment — JRE).
Do you have local.properties
file inside project root? See IDEA-266804. Will be fixed in next IDE update.
As a workaround, disable the Android plugin in Settings | Plugins or remove the local.properties
file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With