KamranAli-0346 avatar image
0 Votes"
KamranAli-0346 asked YonglunLiu-MSFT commented

java SDK error when trying to use Android v12.0 Target Framework

I am trying to compile my code against Target Framework 12.0 on Android (first image below) but keep getting this error.

Error: Java SDK 11.0 or above is required when using $(TargetFrameworkVersion) v12.0.

I have downloaded and installed jdk18 and pointed Xamarin to it as well but no luck (second image below)

Any ideas how this can be resolved? I have already tried the step provided here but no luck



image.png (22.2 KiB)
image.png (33.3 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Cloud you please provide the information about build log in your Visual Studio?

In the build log, you could check whether the Visual Studio is using JDK 11 above or not.

Android SDK: C:\Program Files (x86)\Android\android-sdk\
Android SDK Build Tools: C:\Program Files (x86)\Android\android-sdk\build-tools\30.0.3\
Java SDK: C:\Program Files\Microsoft\jdk-\

If the Java SDK is still JDK 1.8, you need to remove the older version and re-install the OpenJDK.

0 Votes 0 ·

0 Answers