15

I am developing xamarin forms application and i got the below error when running application on android emulator

>The package was not properly signed (NO_CERTIFICATES).
2>   at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
2>   at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass94_0.<InstallPackage>b__0(Task`1 t)
2>   at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
2>   at System.Threading.Tasks.Task.Execute()
2>Done building project "Modern.FM.Mobile.Android.csproj".
2>Build succeeded.
2>The package was not properly signed (NO_CERTIFICATES).
2>   at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
2>   at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass94_0.<InstallPackage>b__0(Task`1 t)
2>   at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
2>   at System.Threading.Tasks.Task.Execute()
Saamer
  • 4,451
  • 1
  • 10
  • 47
Mahmoud Alam
  • 350
  • 1
  • 5
  • 12
  • Manually delete the package from emulator (either via `Setting` in the emulator or via `adb` via `adb uninstall yourpackagenamehere` and then perform a clean/build all and run a debugging session – SushiHangover Mar 09 '18 at 19:49
  • I completely removed emulator and re added it and still not working. Also i tried different emulators. – Mahmoud Alam Mar 09 '18 at 19:57
  • Rebuild the app using MSBuild diagnostic level logging and look for other errors/warning, especially around the `jarsigner` task – SushiHangover Mar 09 '18 at 20:00
  • When targeting android 11, this will happen if not signing with the v2 scheme. https://stackoverflow.com/a/63564053/361714 – Tom Aug 24 '20 at 15:44

6 Answers6

19

I just delete all file in Folder /bin from my Android project and recompile.

Gustavo
  • 535
  • 5
  • 10
  • 1
    This is the kind of software quality I would expect from npm. Very disappointed in MS. – user10753492 Oct 24 '19 at 01:34
  • 2
    This literally happens all the time in VS, not surprised at all. – Ferre12 May 28 '20 at 13:28
  • It's been a while since I had to work on a this mobile project I have. When I got the error, I searched and ended up here. As soon as I saw this, I remembered I have a bash script that goes through and cleans all the /bin and /obj folders just because of how frequently this happens. – Ickster Sep 14 '20 at 21:42
2

If none of the other solutions work, just open your android project options, and then go to Android Package Signing, and make sure "Sign the .APK file..." is deselected for all the configurations and platforms, as shown: Screenshot of the Android options window

Saamer
  • 4,451
  • 1
  • 10
  • 47
1

This problem happened after installing visual studio 2017 updates. after running visual studio repair everything worked fine.

Mahmoud Alam
  • 350
  • 1
  • 5
  • 12
1

I had the same error but for me just repairing Visual Studio didn't work so I investigated a little bit more and I found out that the problem was related to the java version.

The solution was to uninstall the jre/jdk for java version 9 and now I can deploy again.

jcasas
  • 285
  • 3
  • 12
1

If deleting /bin folder does not help, try this:

Close Visual Studio.

Open Visual Studio Installer, in drop-down menu select Repair

John Deer
  • 1,472
  • 1
  • 10
  • 15
0

I had the same problem though I got that error once only in emulator and once only in device! I removed my my redundant Java 9 as @jcasas told and also updated my Visual Studio from 15.6.6 to 15.7.0 .

VahidShir
  • 1,788
  • 2
  • 14
  • 25