This repository was archived by the owner on May 1, 2024. It is now read-only.
[Bug] error MSB6006: "java" exited with code 2 - Cannot deploy to device #15293
Unanswered
theolliebbb
asked this question in
Q&A
Replies: 1 comment 4 replies
-
DId you also try things like these? https://stackoverflow.com/questions/63530855/xamarin-app-cant-deploy-to-android-11-emulator I think ultimately this is a problem in your setup and more a Xamarin.Android thing |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
(copied from stackoverflow) https://stackoverflow.com/questions/71751365/error-msb6006-java-exited-with-code-2-on-xamarin-android?noredirect=1#comment126818451_71751365
I know this question has been asked several times- My Xamarin Android package builds just fine, and gives me this error- I can't run ANY project (including fresh new projects) on any emulator or my own physical Android- Runs totally fine on IOS. I'm on Mac
I've tried everything I could find online
Reinstalling VS 2019
Using VS 2022
Reinstalling Xamarin and all emulators as well as Java SDKs and Android SDKs
Enabling/disabling multidex or Appkey signing with debug.keystore and other custom made keys ( this gives error MSB6006: "java" exited with code 1.) on both debug and release
Sometimes with different parameters, I get "error ADB0010 The package was not properly signed (NO_CERTIFICATES)."
Also not able to find a solution for that
This problem came about after updating an app on google play console, but I don't see why this would have anything to do with it
If anybody could help, it'd be greatly appreciated- I'm completely unable to test my xamarin projects on Android at all and it's driving me crazy.
Edit:
The code that is supposedly the culprit is:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2309,2)
Which is
Edit 2:
When ASB00100 shows up here's the error log:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: Mono.AndroidTools.InstallFailedException: The package was not properly signed (NO_CERTIFICATES). /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess (System.String output, System.String packageName) [0x000de] in /Users/builder/azdo/_work/1/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Mono.AndroidTools/Internal/AdbOutputParsing.cs:338 /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at Mono.AndroidTools.AndroidDevice+<>c__DisplayClass100_0.<InstallPackage>b__0 (System.Threading.Tasks.Task`1[TResult] t) [0x00016] in /Users/builder/azdo/_work/1/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Mono.AndroidTools/AndroidDevice.cs:803 /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at System.Threading.Tasks.ContinuationTaskFromResultTask`1[TAntecedentResult].InnerInvoke () [0x00024] in <e068e2227ab74c1bb3d724ebaab0e3ff>:0 /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at System.Threading.Tasks.Task.Execute () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319 /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: --- End of stack trace from previous location where exception was thrown --- /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at AndroidDeviceExtensions.PushAndInstallPackageAsync (Mono.AndroidTools.AndroidDevice device, PushAndInstallCommand command, System.Threading.CancellationToken token) [0x001cf] in /Users/builder/azdo/_work/1/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Devices/AndroidDeviceExtensions.cs:206 /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at AndroidDeviceExtensions.PushAndInstallPackageAsync (Mono.AndroidTools.AndroidDevice device, PushAndInstallCommand command, System.Threading.CancellationToken token) [0x0042f] in /Users/builder/azdo/_work/1/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Devices/AndroidDeviceExtensions.cs:223 /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage (System.Boolean installed) [0x001c0] in /Users/builder/azdo/_work/1/s/xamarin-android/external/monodroid/tools/msbuild/Tasks/FastDeploy.cs:338 /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage (System.Boolean installed) [0x0032d] in /Users/builder/azdo/_work/1/s/xamarin-android/external/monodroid/tools/msbuild/Tasks/FastDeploy.cs:355 /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.RunTaskAsync () [0x002fb] in /Users/builder/azdo/_work/1/s/xamarin-android/external/monodroid/tools/msbuild/Tasks/FastDeploy.cs:212
culprit (Common.Debugging.Targets):
Steps to Reproduce
Expected Behavior
Actual Behavior
Basic Information
Environment
Show/Hide Visual Studio info
Build Logs
Build runs just fine!
here's the deploy to device log with the NO_CERTIFICATES error:
https://gist.github.com/theolliebbb/6eebb9f264b5616828c00384c4275d84
with error code 2:
https://gist.github.com/theolliebbb/ada1ab7f7bb6ca911471843f96e5ba4f
Screenshots
Reproduction Link
Seems to be specific to my Mac- Any Xamarin project going to android gives this error
Workaround
Beta Was this translation helpful? Give feedback.
All reactions