Android development requires JDK 8(1.8)64-bit - java

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

Related

will java17 work on older version of Android studio (specifically Android studio 1.5.1)

I have a system of 2ig ram so I was recommended to download and install Android studio 1.5.1 with java 7...
But I already have java17 installed..
Any Reason why won't java17 work on older version of Android studio specifically Android studio 1.5.1
Each version of Android Studio is designed to support a specific (maximum) version of Android.
That version of Android requires a specific version of the Java compiler to create its packages.
Java 17 (and indeed all versions from 9 and up) aren't (fully) backwards compatible with Java 8 and below.
It's not that you couldn't run the later versions of Android Studio without having an older Java SDK installed (it comes with its own built-in Java runtime for that), but you won't be able to successfully compile things.
Recommending Java 1.7 however is a big nono, that version has been out of support for years. At the very least you want Java 8.

Visual Studio Xamarin on Windows 10: Cannot determine Java Version

I've been trying to get started with Xamarin on Visual Studio Community 2019, but every time a new Android project is created and run, deployment is aborted and the warning below appears. I've already uninstalled and reinstalled both Java and VS, modified and repaired VS, and tried out different versions of the JDK, yielding no results. Any ideas on why this may be happening and how can it be fixed?
The current version of the JDK I'm using is 17.0.1
You can recheck if you have set up the Android SDK for Xamarin.Android correctly.
Xamarin.Android uses the Java Development Kit (JDK) and the Android SDK to build apps. During installation, the Visual Studio installer places these tools in their default locations and configures the development environment with the appropriate path configuration.
And for most users these default locations will work without further changes.
Xamarin.Android uses JDK 11, which is required for API 31 and greater, JDK 8, which is required if you are developing for API level 24 to 30 (JDK 8 also supports API levels earlier than 24).
For example:
For most users these default locations will work without further changes.
For more, you can check: https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/windows#configuration
For how to set up the Android SDK for Xamarin.Android, you can check: Setting up the Android SDK for Xamarin.Android .
Note:
I recommend that you remove the older sdk and jdk files and use the latest version of Visual Studio with the default JDK and SDK Settings.

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.

jdk path not valid on older android studio mac

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

Can I install 2 or more Android SDK when using Eclipse

I am new to android developments. I am setting up my android development environment using Eclipse. I have a test smart phone with Android version 4.2.2. The automatic installation installed the latest Android SDK version, which is 5.1.1. My questions are:
1. Do I have to install the SDK version 4.2.2 to test on my test mobile with Android 4.2.2.?
2. What will happened if I do not install SDK version 4.2.2 and try to run app developed with SDK version 5.1.1?
3. If I have 3 or more Android units, each with different Android version, then do I have to install all the matching SDK versions?
Thank you for your help.
regards,
John
There shouldn't be any problem if you use the latest SDK version ; actually, this is recommended.
However, make sure to set the correct "Target SDK", i.e. the highest android version you have successfully tested your app with, and the "Minimum Required SDK" as well.

Categories

Resources