Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
@Danish can you please provide the build output and error message? It looks like there may have been an issue with copy/pasting gists. I suspect this case may be similar to bug #42669.
This looks to me like we need to have JDK 1.8 installed .
@Danish can you let us know which version of Java you have installed?
Please provide diagnostic build output:
Alternatively, please build via `xbuild` on the command-line:
$ xbuild /t:SignAndroidPackage /v:diag YourProject.csproj > b.txt
then gist the contents of b.txt.
Whatever tool is executing to produce the build error doesn't like JDK 1.8 .class files, and I don't know what tool that is.
Relevant diagnostic build output:
> Task "CreateMultiDexMainDexClassList"
> Using task CreateMultiDexMainDexClassList from Xamarin.Android.Tasks.CreateMultiDexMainDexClassList, Xamarin.Android.Build.Tasks, Version=22.214.171.124, Culture=neutral, PublicKeyToken=null
> ClassesOutputDirectory: obj/Debug/android/bin/classes
> MultiDexMainDexListFile: obj/Debug/multidex.keep
> ToolExe: mainDexClasses
> ToolPath: /Users/petercollins/Library/Developer/Xamarin/android-sdk-macosx/build-tools/24.0.2//
> Tool /Users/petercollins/Library/Developer/Xamarin/android-sdk-macosx/build-tools/24.0.2//mainDexClasses execution started with arguments: --output obj/Debug/multidex.keep '/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v7.0/mono.android.jar':'/Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/android-support-multidex.jar':'/Users/petercollins/.local/share/Xamarin/Xamarin.Android.Support.v4/126.96.36.199/embedded/classes.jar':'/Users/petercollins/.local/share/Xamarin/Xamarin.Android.Support.v4/188.8.131.52/embedded/libs/internal_impl-23.1.1.jar':'/Users/petercollins/.local/share/Xamarin/Xamarin.Android.Support.v7.AppCompat/184.108.40.206/embedded/classes.jar':'obj/Debug/android/bin/classes'
> Environment variables being passed to the tool:
> java_tool_options= -Dfile.encoding=UTF8
> Error: Can't read [/Library/Frameworks/Xamarin.Android.framework/Versions/7.0.0-3/lib/xbuild-frameworks/MonoAndroid/v7.0/mono.android.jar] (Can't process class [android/app/ActivityTracker.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7)))
> Tool /Users/petercollins/Library/Developer/Xamarin/android-sdk-macosx/build-tools/24.0.2//mainDexClasses execution finished.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: error : Tool exited with code: 10. Output: Error: Can't read [/Library/Frameworks/Xamarin.Android.framework/Versions/7.0.0-3/lib/xbuild-frameworks/MonoAndroid/v7.0/mono.android.jar] (Can't process class [android/app/ActivityTracker.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7)))
The tool involved is `build-tools/24.0.2/mainDexClasses`, which is a shell script, which invokes *proguard* with the `mainDexClasses.rules` ruleset.
Proguard, as included in the Android SDK, doesn't support Java 1.8: http://stackoverflow.com/questions/24713640/proguard-does-not-support-java-8 (among others).
(I thought we had a bug about that, but I can't find it at present.)
Thanks again to @PeterC for pointing out the "actual" bug: Bug #42669.
Marking as a duplicate of Bug #42669 for now. The problem is that the `proguard` included in the Android SDK doesn't support JDK 1.8 bytecode.
*** This bug has been marked as a duplicate of bug 42669 ***
Seeing as we are not authorised to see BUG 42669 and I am having the exact same issue, could someone suggest a workaround / fix please.
Thanks for your help
I agree with @matt, it would be nice to be able to check the status of the Bug at least...
Note that updating 'Android SDK Tools' will overwrite any custom proguard you may have copied into your SDK.