Forum Visual Studio

Unable to build and deploy on Android after Visual Studio 20019 for Mac update

PacodosoPacodoso FRUniversity ✭✭✭

Hello,

I work on Mac and I just update Visual Studio for Mac 20109 to the latest version: Version 8.8 (build 2913)

After this, I'm no longer able to build/deploy Android apps I worked on.

I've created an empty new Xamarin.Forms project, but I get the same issue.

The output is:

zipalign
    /Users/pacodoso/Library/Developer/Xamarin/android-sdk-macosx/build-tools/30.0.0/zipalign exited with value: 0
    Creating: /var/folders/yv/7m_37_p15g1bymlxqxmcgv3r0000gn/T/2medl58y.mxk/Mono.Android.Platform.ApiLevel_28.apk
    Executing: /Users/pacodoso/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25/bin/java -jar "/Users/pacodoso/Library/Developer/Xamarin/android-sdk-macosx/build-tools/30.0.0/lib/apksigner.jar" sign --ks "/Users/pacodoso/.local/share/Xamarin/Mono for Android/debug.keystore" --ks-key-alias "androiddebugkey" --out "/var/folders/yv/7m_37_p15g1bymlxqxmcgv3r0000gn/T/2medl58y.mxk/Mono.Android.Platform.ApiLevel_28.apk" --ks-pass "pass:android" --key-pass "pass:android" "/var/folders/yv/7m_37_p15g1bymlxqxmcgv3r0000gn/T/2medl58y.mxk/unsigned.apk"
    /Users/pacodoso/Library/Developer/Xamarin/android-sdk-macosx/build-tools/30.0.0/zipalign exited with value: 0
    Creating: /var/folders/yv/7m_37_p15g1bymlxqxmcgv3r0000gn/T/2medl58y.mxk/Mono.Android.Platform.ApiLevel_28.apk
    Executing: /Users/pacodoso/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25/bin/java -jar "/Users/pacodoso/Library/Developer/Xamarin/android-sdk-macosx/build-tools/30.0.0/lib/apksigner.jar" sign --ks "/Users/pacodoso/.local/share/Xamarin/Mono for Android/debug.keystore" --ks-key-alias "androiddebugkey" --out "/var/folders/yv/7m_37_p15g1bymlxqxmcgv3r0000gn/T/2medl58y.mxk/Mono.Android.Platform.ApiLevel_28.apk" --ks-pass "pass:android" --key-pass "pass:android" "/var/folders/yv/7m_37_p15g1bymlxqxmcgv3r0000gn/T/2medl58y.mxk/unsigned.apk"
    Removing temporary directory: /var/folders/yv/7m_37_p15g1bymlxqxmcgv3r0000gn/T/2medl58y.mxk
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  Deployment failed
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000: Xamarin.AndroidTools.AndroidSdkToolException: Error: A JNI error has occurred, please check your installation and try again
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000: Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.lang.ClassLoader.defineClass1(Native Method)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.security.AccessController.doPrivileged(Native Method)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000: 
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:   at Xamarin.AndroidTools.PlatformPackage.GetPlatformPackagePathAsync (System.Int32 apiLevel, System.String aaptPath, Xamarin.AndroidTools.IProgressNotifier progressReporter, System.Threading.CancellationToken token) [0x00270] in /Users/builder/azdo/_work/451/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/PlatformPackage.cs:139 
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:   at Xamarin.AndroidTools.AndroidDeploySession.InstallSharedPlatformAsync () [0x000a9] in /Users/builder/azdo/_work/451/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:349 
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:   at Xamarin.AndroidTools.AndroidDeploySession.EnsureCorrectSharedRuntimes () [0x0017a] in /Users/builder/azdo/_work/451/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:270 
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:   at Xamarin.AndroidTools.AndroidDeploySession.RunAsync (System.Threading.CancellationToken token) [0x001f9] in /Users/builder/azdo/_work/451/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:198 
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:   at Xamarin.AndroidTools.AndroidDeploySession.RunLoggedAsync (System.Threading.CancellationToken token) [0x0002f] in /Users/builder/azdo/_work/451/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:123 
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000: Xamarin.AndroidTools.AndroidSdkToolException: Error: A JNI error has occurred, please check your installation and try again
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000: Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.lang.ClassLoader.defineClass1(Native Method)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.security.AccessController.doPrivileged(Native Method)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:  at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000: 
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:   at Xamarin.AndroidTools.PlatformPackage.GetPlatformPackagePathAsync (System.Int32 apiLevel, System.String aaptPath, Xamarin.AndroidTools.IProgressNotifier progressReporter, System.Threading.CancellationToken token) [0x00270] in /Users/builder/azdo/_work/451/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/PlatformPackage.cs:139 
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:   at Xamarin.AndroidTools.AndroidDeploySession.InstallSharedPlatformAsync () [0x000a9] in /Users/builder/azdo/_work/451/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:349 
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:   at Xamarin.AndroidTools.AndroidDeploySession.EnsureCorrectSharedRuntimes () [0x0017a] in /Users/builder/azdo/_work/451/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:270 
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:   at Xamarin.AndroidTools.AndroidDeploySession.RunAsync (System.Threading.CancellationToken token) [0x001f9] in /Users/builder/azdo/_work/451/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:198 
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(579,2): error ADB1000:   at Xamarin.AndroidTools.AndroidDeploySession.RunLoggedAsync (System.Threading.CancellationToken token) [0x0002f] in /Users/builder/azdo/_work/451/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:123 
Done building target "_Upload" in project "DebugAndroidIssue.Android.csproj" -- FAILED.

Done building project "DebugAndroidIssue.Android.csproj" -- FAILED.

Build FAILED.

Posts

  • PacodosoPacodoso FRUniversity ✭✭✭

    Finally, I've updated all the Android SDK through Android Studio. After this, all works fine again.

Sign In or Register to comment.