8

I'm trying to install the app I making on my phone. But I keep getting an error

Installation error: INSTALL_PARSE_FAILED_NO_CERTIFICATES 

I'm using Eclipse. I've never seen this problem before. I have run my app on my phone hundreds of times. No apparent errors exist in any files of my project. I edited the Manifest file upping the version, but it didnt work. I cleaned my project. I uninstalled the current version of my app from my phone. But none of this works.

I have absolutely no idea what the problem is. The LogCat claims it is a problem with my main.xml file.

ERROR/PackageParser(956): Package ##MY PACKAGE NAME has no certificates at entry res/layout/main.xml; ignoring! 

I havent touched this file so I dont know what could be the problem.

UPDATE: Things got more confusing. Before the problem occured I drag-n-dropped a few png files into the drawable folder (where there are already a few). After pulling my hair out it dawned on me the problem might be these files. I deleted them all (5 in total) and it works now. Only problem is I dont know why they screwed up installation.

2
  • 1
    Try cleaning the project and rebuilding. Commented Apr 5, 2011 at 0:49
  • Did it. Cleaned it, rebuilt it - same problem. Restarted eclipse. tried it again. Same result. I'm baffled. Commented Apr 5, 2011 at 0:52

1 Answer 1

8

It seems to be a fairly common issue: http://code.google.com/p/android/issues/detail?id=830

A workaround is to export an unsigned package and sign it manually with signapk.jar

Verbatim:

Comment 26 by lucasiturbide, Apr 14, 2010 Hi everybody. I have solved this in my project by signing the APK with the debugkey and the jarsigner tool provided by android tools.

Just execute this:

 jarsigner -verbose -keystore <userhome>/.android/debug.keystore <package.apk> androiddebugkey 

and you will have your nice fresh and working apk for debugging only purpose. Remember you have to sign your APK with a valid signature to publish your application at the Market

The password for the debug key with the alias "androiddebugkey" is "android".

Sign up to request clarification or add additional context in comments.

2 Comments

This solution also works when specifying your own (non-debug) keystore. Replace .../debug.keystore with the path to your own keystore, and androiddebugkey with the name of your key. Thanks!
If your ~/.android/debug.keystore does not exist, there's a command to generate the very specific one: stackoverflow.com/a/10981870/198348