Hello I'm wondering to start using Android studio but I am facing a settings problem.
I want to run on Android studio an Android app already working. But when I want to build the app there is an error message that indicates that Android studio don't find the tools.jar file of JAVA.
My Android studio version is 2020.3.1
I have initially install Java JDK 17 version and it seems that since JAVA 1.8 version the tools.jar file is not present anymore.
So I tried to downgrade Java to 1.8 version but the Android studio app is not compatible with versions older than JAVA 11.
So I was wondering if someone have faced the same problem and how I could overcome this.
Thanks in advance for any kind of help.
Related
So I am very much a newcomer to the android studio, so I might've missed a few settings here and there, but
when I try to run a code with created java module, it doesn't recognize any of my code.
I attached the screenshot of what the ide returned to me.
I tried to reinstall the newest version of the android studio with the newest version of SDK (I attached another image file.) several times, but it doesn't seem to go anywhere.
For the SDK tools, I have the followings:
Android SDK Build-Tools
Android Emulator
Android SDK Platform-Tools
Also, I did try Build>Cealn Project.
Does anyone know how to fix this problem?
P.S. Here is my build gradle for the java module.
So I recently deleted the -studio64.exe.vmoptions file and the next time I launched it, it's unable to detect common libraries like 'String' and 'System'. I tried to download Jetbrains IDE also, and it throws the same error-
https://i.stack.imgur.com/EV3EV.png
What I have tried so far:
Change gradle build version
Reinstall Android studio
Uninstall Android studio completely- including jdk and sdk dependencies. Upon reinstallation (technically from scratch), the issue still persisted.
Any help will be appreciated. Thanks!
I use unity 2020.3.13, i start to work with android game. I try to set the JDK with JDK that I got from Android Studio, but i get this error:
Incompatible Java version '16'
Android development requires JDK 8(1.8)64-bit. Having Java Runtime Environment(JRE) installed is not sufficient.
I'm confused because my JDK version is more than 8 but still can't. Do I have to install the exact JDK version 8? And is it better to use Unity's provided JDK, SDK, NDK, and Gradle or the ones from Android Studio?
Finally, it turned out that the problem was with my JDK installation. i re-installed the android module in unity and used the jdk given by unity and everything worked fine
I download android studio version 1.4 because I want to compile apk from old android studio project, then when ask for jdk location I put jdk location. But android studio did not recognize it.
What is the correct path for jdk in android studio mac?image of error
I want to compile apk from old android studio project
As far as I know, latest Android Studio can compile old projects just fine. Gradle and its plugins are what build the project, not the IDE.
Maybe since you're using an older version, though, Java 12 would not be recognized as valid, and you'd have to get Java 8, possibly
I'm on Linux (Arch Linux) and using Android Studio 2.3.1
When creating a new empty project in Android Studio I get the error:
Gradle sync failed:
org.gradle.internal.jvm.UnsupportedJavaRuntimeException.assertUsingVersion(Ljava/lang/String;Lorg/gradle/api/JavaVersion;)V
Consult IDE log for more details (Help | Show Log)
It seems that there is something with the java version. I have openjdk-8 installed and also tried with Oracle JDK version 8 (also tried with version 7).
Things i've tried:
Using installed gradle or gradle that comes with Android Studio
Removing ~/.gradle and ~/.android.
Update:
If I enter the project directory and run gradle build i.e. using my installed gradle version it seem to build. However, being able to run gradle from Android Studio seem essential to even use Android Studio.
I upgraded to Android Studio 2.3.2 and then this particular problem was solved.
I did not use the package from AUR (Arch User Repository) when upgrading, instead I used the Android Studio "Check for updates" and upgraded that way. I don't know if that matters.
Update:
Happened again when upgrading to Android Studio 3.0.1 from AUR. Installing the official build from http://developer.android.com works though so it's some issue with the build in AUR for ArchLinux.
I had the same problem AFAIK.
Firstly I had a version previous to 3.0.1 of Android, then I downloaded the Android zip package from the official website, then installed it and kept the same old preference files (or so). Then this problem appeared. What I did is uninstalling (thus deleted the android-studio folder in terms of Ubuntu) and installing it back again and it was solved.