Unsupported class version number [52.0] (maximum 51.0, Java 1.7)
Xamarin Android Unsupported class version issues
When doing Xamarin Android development, you may have come across the error message after enabling MultiDex:
1
Error Can't read [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v7.1\mono.android.jar] (Can't process class [android/app/ActivityTracker.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7)))
This is most likely because of an older ProGuard installation.
Download the latest ProGuard from here (v5.3.3 as of this writing).
Determine the current Android SDK location that Xamarin is using by checking Tools->Options->Xamarin->Android Settings.
In my case it is C:\Users\Magnus\AppData\Local\Android\android-sdk
.
So here is how to to so update the Proguard installation;
In the tools sub folder, rename the current proguard to proguard.old.
Extract the contents of the latest ProGuard zip file to a folder named proguard.
That should do it. Just remember that any changes in the SDK installation (using the Android SDK Manager) will put back the older version, so repeat this after an SDK update.