jdk path not valid on older android studio mac - java

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

Related

I Can't Run a Java Module on Android Studio

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.

Tools.jar could not be located by Android studio

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.

Android development requires JDK 8(1.8)64-bit

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

Build failed in Android Studio 3.1, gradle 4.4 class signer information does not match signer information of other classes in the same package

I'm making a project in Android Studio 3.1 with libgdx and i can't build my project because it says:
class "org.bouncycastle.jcajce.provider.symmetric.IDEA$Mappings"'s signer information does not match signer information of other classes in the same package
But i don't use "bouncycastle" or something
I checked a lot pages and topics about this problem but i didn't find any solutions for this. Also i haven't any jar files and i never tried to sign something, i'm only trying to build my project
Please help me guys, i really stuck at it
Update: Java 10.0.2 was having issues with GDX 1.9.8 so I downgraded to Java 8 and everything is working as expected. If you installed the latest Java 10, uninstall and download and install the java 8 version.
Old evaluation:
I've recently encountered this issue with android 3.1.4 and a current version of libgdx(jar downloaded on 09/xx/2018).
Environment: Freshly installed Windows 7 Ultimate + sp1 + convenience rollup, gdx-setup.jar(September xx, 2018), + Android Studio 3.1.4(clean install), java 10.0.2.
Problem reproduced: gdx-setup.jar with my updated "build-tools" + "api" produced a project, but the project did not compile in Android Studio and produced the error originally posted.
Process: gdx-setup.jar with its default build-tools(27.0.3) and default api(27) will produce an error about incorrect api 28 > 27, which may not be relevant to some, but new installations of Android Studio 3.1.4 may encounter this. Used Android studio sdk-manager(tools tab) and downloaded 27.0.3 build-tools and sdk-tools (make sure the "Show package details" is checked for visibility). After installing the above and rerunning gdx-set.jar on defaults, I was able to produce the project and even compile/run on Android studio.
Temporary Solution for GDX(September 2018): Ensure Android Studio has: build-tools 27.0.3 + sdk-tools 27, and create the gdx project using defaults for tools (No to both prompts when creating gdx project).

Android Studio Gradle Sync Failed - Unsupported Java

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.

Categories

Resources