I just tried to update Android studio from 1.4 to 2.2 preview 2. After updating Android Studio, when I tried to open it, it showed me this error:
Error:(1, 1) A problem occurred evaluating project ':app'.
java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0
Can any one help me to resolve this?
Open your gradle. properties file in Android Studio. Restart Android Studio for your changes to take effect. Click Sync Project with Gradle Files to sync your project.
According to Android Studio's official system requirements, it takes at minimum 3 GB RAM to run smoothly. Honestly, its a lot and I believe that is the biggest cause of being it too slow all the time. The android developers are always complaining about the speed of Android Studio and how its slow ALL THE TIME.
Android Studio Chipmunk | 2021.2. Android Studio - Chipmunk | 2021.2. 1 Patch 2 is now available in the Stable channel. If you already have an Android Studio build on the Stable channel, you can get the update by clicking Help > Check for Update (Android Studio > Check for Updates on macOS).
Since Android Studio, by default, runs a Gradle build when you start up, it manifests as an extremely slow start-up. The problem is extremely easy to check for: While you are experiencing the symptoms of a slow Android Studio, press Ctrl - Alt - Delete and open Windows Task Manager.
I spent quite a lot of time with this one in Android Studio too.
It seems this problem is caused by the difference in java version used for compiling the project.
Finally, inside the "Project Structure" settings window, I enabled the "Use embedded JDK (recommended)" in the SDK location tab.
And happy compiling :)
Your runtime environment is running a different version of Java than your compiler - 52.0 represents Java SE 8
On Linux, type:
sudo update-alternatives --config java
Output will be like:
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-7-oracle/jre/bin/java 2 auto mode
1 /usr/lib/jvm/java-7-oracle/jre/bin/java 2 manual mode
* 2 /usr/lib/jvm/java-8-oracle/jre/bin/java 1 manual mode
Press <enter> to keep the current choice[*], or type selection number:
Select 2
Then compile your project:
./gradlew assembleDebug
This fixed it for me:)
On Windows, you can do it via the Java Control Panel very easily - read more about it here!
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