Can't deploy to Android 11 emulator. (I can deploy to Android 10 emulator)
ADB0010: Deployment failed
Mono.AndroidTools.InstallFailedException: The package was not properly signed (NO_CERTIFICATES).
at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass97_0.<InstallPackage>b__0(Task`1 t)
at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at AndroidDeviceExtensions.<PushAndInstallPackage>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at AndroidDeviceExtensions.<PushAndInstallPackage>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Xamarin.AndroidTools.AndroidDeploySession.<InstallPackage>d__116.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Xamarin.AndroidTools.AndroidDeploySession.<RunAsync>d__110.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Xamarin.AndroidTools.AndroidDeploySession.<RunLoggedAsync>d__108.MoveNext()
This is a debug build, so I'm not explicitly signing it.
But I notice that it's automatically being signed anyway with an androiddebugkey:
C:\Program Files\Android\Jdk\microsoft_dist_openjdk_1.8.0.25\bin\jarsigner.exe -keystore "C:\Users\$USERNAME$\AppData\Local\Xamarin\Mono for Android\debug.keystore" -storepass android -keypass android -digestalg SHA-256 -sigalg SHA256withRSA -signedjar bin\Debug\$UNSIGNEDAPKNAME$.apk $PATHTOAPK$.apk androiddebugkey
In case debug.keystore, was somehow out of date, (mine was timestamped 2018-03-26), I removed it and it got regenerated by the build. (with reasonable sized differences), But I still received the "Mono.AndroidTools.InstallFailedException: The package was not properly signed (NO_CERTIFICATES)."
error.
I've tried cleaning and rebuilding. I'm targeting Android 11.0 (API Level 30 -R)
Update:
I received a little more information when I manually attempting to installing with adb:
adb -e install $myapp$.apk
...
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Scanning Failed.: No signature found in package of version 2 or newer for package $PACKAGE$]