Same Problem here after I added xamarin.maps from NuGet to my project. It compiles and runs fine on iOS but Android is a huge problem. Fails to build with no obvious reasons...
holy moly, I think I found a solution: looks like the preview sdks for api-level 24 were the problem. Open the Android-SDK-Manager an deinstall everything from the preview-channels, after that clean all, rebuild all...worked for me.
I concur with Markus, with a twist...I did not have API level 24 preview installed, but I did have API 24 Build Tools, which was not from the preview channel. Things worked only after I removed API 24 Build Tools.
@AllisonTaylor said:
I concur with Markus, with a twist...I did not have API level 24 preview installed, but I did have API 24 Build Tools, which was not from the preview channel. Things worked only after I removed API 24 Build Tools.
Yeah....need to remove API24 Build Tools as well.....
download android JDK1.8 from below location oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
And in Preferences->SDK Locations ->Android change your JDK path to JDK 1.8
This is a version miss match that your compiler is looking for java version 8 and you have java version 7.If you have installed Android studio make sure to set JDK paths separately and if you are installing Android studio after installing tamarin studio ,make sure it doesn't override your JDK version
@ireshika
Strangely enough, this is the only solution that actually solved my issue. No matter what, I could not seem to get it to compile using JDK 1.7.X. However by updating to 1.8, it is now indeed working without a hitch. Very odd, as I'm using 1.7 at home without a problem... But it works, so I'm satisfied. Thank you!
Install JDK 1.8 in mac it would work fine
Some times update does not work in mac so check your jdk version by using terminal and checking javac -version if javac 1.7 update JDK manually
Like @JevgenijKononov said, the new version of Xamarin finally supports Android 7, which uses Android SDK Build Tools 24. Android SDK Build Tools 24 require Java JDK 8.
To get everything working, upgrade Xamarin Studio and Xamarin Visual Studio plugin completely. Then install Java JDK 8 (I am using JDK 8 Update 102). Then go into Visual Studio -> Options -> Xamarin -> Android Settings -> and click Change next to Java Development Kit Location and go find your JDK 8 directory (mine is located in C:\Program Files (x86)\Java\jdk1.8.0_102).
After that I deleted all /obj/ and /bin/ folders from all projects, rebuilt, and deployed successfully.
Spent one whole day on this issue "Unsupported major.minor version 52.0" - just like area 51 ! Crazy.
What I did?
I've updated the Java SDK from 1.7 to 1.8. (That's skrew up my thing..)
I've installed Android Studio in my Mac machine. The same machine as where my Xamarin Studio.
I've this - Android SDK Build-tools 24 in my Android SDK manager (In Xamarin Studio). Because I want to support Android N.
Argghh!! I can't build my Android app in Xamarin Studio! "Unsupported major.minor version 52.0"
After a long investigation, sdk update, etc. hmmm... Here is the summary: 1) Android SDK:
I have these install in my Android SDK:
Android SDK Build-tools 24.0.1
Android SDK Build-tools 24.0.2
Android SDK Platforms-tools 24.0.3
(See attached). - NOTE, basically I DO NOT need to remove or uninstall Android SDK Build-tools 24.
2) Java SDK
If not mistaken, the default location of the "Java SDK" in Xamarin Studio is always pointing to: /usr (I am not sure how Xamarin Studio choose. 1.7 or 1.8? - I suspect maybe that's the main cause of the error)
So, I have downloaded the Java SDK 1.7 and 1.8 manually from the locations below, then install it (I think I need both).
Time to check Java Runtime Environment
OK, it is 1.8.0_102 (See attached)
Last and also the most important thing to change:
Change the Java SDK location in Xamarin Studio! (Not Android sdk).
Goto Xamarin Studio Preferences --> SDK Location --> Android
Now, instead of using the default path '/usr', please change the path to where the newly installed JDK1.8 folder.
Example: /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home
3) Result:
Now, you should able to build the app without error. That's how I have resolved the problem. And, I managed to build my app with Target framework 'Android 7.0 (Nougat), Target Android version: Override-Android 7.0
(API level 24) or below . Bingo!
@MarkusStoebe said:
holy moly, I think I found a solution: looks like the preview sdks for api-level 24 were the problem. Open the Android-SDK-Manager an deinstall everything from the preview-channels, after that clean all, rebuild all...worked for me.
To be fair Jevgenij Kononov already gave the correct solution to this on August 30th which also by the way keeps things up to date with the latest and greatest :-). No need to downgrade any Android 7 SDK's just reference the new 64 bit version of JDK 1.8 rather than the old 32 bit version of JDK 1.7
"Go to visual studio and change inside project properties SDK version and that all."
@ireshika thanks for the answer! that worked for me! without having to uninstall API Level 24 stuff, just updated the JDK to 1.8, clean/rebuild app and everything worked!
Download jdk 1.8 and then change options in VSTO 2015 --> Tools/Option/Xamarin/Java Dvelopment Kit to jdk 1.8.
Rebuild --> OK
None of the other propositions (API level 24, ...) worked !
This issue should be clarify by Xamarin.
@ireshika said:
download android JDK1.8 from below location oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
And in Preferences->SDK Locations ->Android change your JDK path to JDK 1.8
This is a version miss match that your compiler is looking for java version 8 and you have java version 7.If you have installed Android studio make sure to set JDK paths separately and if you are installing Android studio after installing tamarin studio ,make sure it doesn't override your JDK version
I'm just here saying this is still not working in March of 2018 after the most recent Xamarin update. I've tried switching JDK paths, removing old build tools, manually updating proguard, updating the NDK, changing the JAVA_HOME variable, and rebooting all the things. Nothing works. I just want to get back to doing what my job's supposed to be. Not fixing the tools. Xamarin is so incredibly frustrating to use when every update introduces batches of regression Xamarin issues.
Turns out venting helped. I got it working. I don't really know how. It was a combination of redoing all of the above things. Eventually it worked. Wish there was a better explanation as to what the issue was and why the above fixes it, but thought I'd share for the others who are still fighting this.
Posts
Same Problem here after I added xamarin.maps from NuGet to my project. It compiles and runs fine on iOS but Android is a huge problem. Fails to build with no obvious reasons...
holy moly, I think I found a solution: looks like the preview sdks for api-level 24 were the problem. Open the Android-SDK-Manager an deinstall everything from the preview-channels, after that clean all, rebuild all...worked for me.
I concur with Markus, with a twist...I did not have API level 24 preview installed, but I did have API 24 Build Tools, which was not from the preview channel. Things worked only after I removed API 24 Build Tools.
This really needs to be fixed...some of us really do work w/ Android Studio and other projects instead of Xamarin Studio :-P
Has anyone reported this bug yet?
p.s., this also affects Xamarin Studio on OSX. Isn't just a Visual Studio plugin issue....
Uninstalling Android N (API 24) , rebuilt and voila...... did the trick for me
Thanks for the solution! @MarkusStoebe
Yeah....need to remove API24 Build Tools as well.....
@AllisonTaylor It fixed my issue too! Had to remove API level 24 and Build tools 24 both!
download android JDK1.8 from below location oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
And in Preferences->SDK Locations ->Android change your JDK path to JDK 1.8
This is a version miss match that your compiler is looking for java version 8 and you have java version 7.If you have installed Android studio make sure to set JDK paths separately and if you are installing Android studio after installing tamarin studio ,make sure it doesn't override your JDK version
@ireshika
Strangely enough, this is the only solution that actually solved my issue. No matter what, I could not seem to get it to compile using JDK 1.7.X. However by updating to 1.8, it is now indeed working without a hitch. Very odd, as I'm using 1.7 at home without a problem... But it works, so I'm satisfied. Thank you!
@ireshika thanks for the solution and posting. i sometimes think it's a waste of time hoping xamarin will actually fix something
Install JDK 1.8 in mac it would work fine
Some times update does not work in mac so check your jdk version by using terminal and checking javac -version if javac 1.7 update JDK manually
thank you so much worked for me
Thanks markus it works
It's work for me, when i removed API 24 Build Tools.
No need to remove anything. Go to visual studio and change inside project properties SDK version and that all.
Like @JevgenijKononov said, the new version of Xamarin finally supports Android 7, which uses Android SDK Build Tools 24. Android SDK Build Tools 24 require Java JDK 8.
To get everything working, upgrade Xamarin Studio and Xamarin Visual Studio plugin completely. Then install Java JDK 8 (I am using JDK 8 Update 102). Then go into Visual Studio -> Options -> Xamarin -> Android Settings -> and click Change next to Java Development Kit Location and go find your JDK 8 directory (mine is located in
C:\Program Files (x86)\Java\jdk1.8.0_102
).After that I deleted all
/obj/
and/bin/
folders from all projects, rebuilt, and deployed successfully.Spent one whole day on this issue "Unsupported major.minor version 52.0" - just like area 51 ! Crazy.
What I did?
Argghh!! I can't build my Android app in Xamarin Studio! "Unsupported major.minor version 52.0"
After a long investigation, sdk update, etc. hmmm... Here is the summary:
1) Android SDK:
I have these install in my Android SDK:
(See attached). - NOTE, basically I DO NOT need to remove or uninstall Android SDK Build-tools 24.
2) Java SDK
So, I have downloaded the Java SDK 1.7 and 1.8 manually from the locations below, then install it (I think I need both).
JDK1.7 http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
(Mac OS X x64 196.89 MB jdk-7u79-macosx-x64.dmg)
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
(Mac OS X 227.35 MB jdk-8u102-macosx-x64.dmg)
Time to check Java Runtime Environment
OK, it is 1.8.0_102 (See attached)
Last and also the most important thing to change:
Change the Java SDK location in Xamarin Studio! (Not Android sdk).
Goto Xamarin Studio Preferences --> SDK Location --> Android
Now, instead of using the default path '/usr', please change the path to where the newly installed JDK1.8 folder.
Example: /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home
3) Result:
Now, you should able to build the app without error. That's how I have resolved the problem. And, I managed to build my app with Target framework 'Android 7.0 (Nougat), Target Android version: Override-Android 7.0
(API level 24) or below . Bingo!
@tohwei lol at "just like area 51 ! Crazy."
I like the way you provide a detailed solution. You should start your own blog just for the latest Xamarin bugs and their solutions.
OMG Thank you for the solution!!! I've been stuck with debugging the blank apps for week.
@iMancha
Thanks for the comment.
Btw, here's my blog http://limtohwei.blogspot.co.uk/
In my case (Windows, Java SDK 1.8) I had to update proguard (manually) to fix this issue.
See this thread for a how-to: https://forums.xamarin.com/discussion/comment/209247/#Comment_209247
This solve the problem for me. Tks!
To be fair Jevgenij Kononov already gave the correct solution to this on August 30th which also by the way keeps things up to date with the latest and greatest :-). No need to downgrade any Android 7 SDK's just reference the new 64 bit version of JDK 1.8 rather than the old 32 bit version of JDK 1.7
"Go to visual studio and change inside project properties SDK version and that all."
Delete Build tools 23.x (all versions of 24)
Delete API level 24 also from Android SDK Manager
It worked for me.
@ireshika thanks for the answer! that worked for me! without having to uninstall API Level 24 stuff, just updated the JDK to 1.8, clean/rebuild app and everything worked!
Download jdk 1.8 and then change options in VSTO 2015 --> Tools/Option/Xamarin/Java Dvelopment Kit to jdk 1.8.
Rebuild --> OK
None of the other propositions (API level 24, ...) worked !
This issue should be clarify by Xamarin.
Perfect!
SOLUTION!!!!
Change the Java SDK to 1.8.x.
After restarting Visual Studio, run "Clean Solution", "Build" and be happy!
I have upgraded to jdk 1.8 and still i cannot see any icon of the application on emulator.
@sanwal can you please elaborate and provide more information on the issue you are facing?
@sanwal It might be worthwhile checking your
adb logcat
to see if that shows any information about what's going on with the device:https://developer.xamarin.com/guides/cross-platform/troubleshooting/questions/version-logs/#Android_adb_logcat_logs
Installing jdk 1.8 and changing the JDK path in VS2015 has fixed the below issues
Thanks.
Install jdk 8 and delete /bin and /obj as @hvaughan said, worked for me. Thanks
Same problem here with Build-Tools 25. Removed it and everything comes back to work.
Installing JDK 8 and setting my Visual Studio Android Settings to point to it worked for me
It seems every time I upgrade Xamarin something like this happens. It takes minutes to install and hours to fix, it's becoming ridiculous.
I'm just here saying this is still not working in March of 2018 after the most recent Xamarin update. I've tried switching JDK paths, removing old build tools, manually updating proguard, updating the NDK, changing the JAVA_HOME variable, and rebooting all the things. Nothing works. I just want to get back to doing what my job's supposed to be. Not fixing the tools. Xamarin is so incredibly frustrating to use when every update introduces batches of regression Xamarin issues.
Turns out venting helped. I got it working. I don't really know how. It was a combination of redoing all of the above things. Eventually it worked. Wish there was a better explanation as to what the issue was and why the above fixes it, but thought I'd share for the others who are still fighting this.
I encountered this after upgrading VS2017 to 15.6.0.
I didn't fix it yet, I'll report the result of trying the above things as CullenJ said.