I am trying to update an older Xamarin.Android codebase. I was using a pre-API 21 target and now trying to update to API 24 (Android Nuget). I think I have resolved the majority of the compatibility issues, but one is troubling me. When I do a build I get the following error.
/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.2-37/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)))
After doing some Google searching I found that the majority of people who are having this issue are using Java 1.8, as am I. Apparently, the bundled version of ProGuard does not support Java 1.8 byte code. I have manually installed the latest version of ProGuard (5.3.1) over the packaged version in the folder below.
~/Library/Android/sdk/tools/proguard
Unfortunately I am still having the same error. I am also using the latest version of the following packages (see screenshot).
Does anyone have any idea how to resolve this build issue?
For this particular error message I had turned out the issue was I installed ProGuard in the wrong place. I originally installed ProGuard in ~/Library/Android/sdk/tools
but instead needed to be in ~/Library/Developer/Xamarin/android-sdk-macosx/
. This resolved that build error.
Just download the latest version of proguard
from the this link ;
Unzip the content to a folder called proguard
;
Replace the folder ~/Library/Developer/Xamarin/android-sdk-macosx/tools/proguard
with the folder from the previous step.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.