I was trying to change my default/main/startup (whatever you call it) activity by editing the androidmanifest.xml
file. All i did was change the android:name
property. however, this completely broke the entire app. when I try to install it fails and reads.
Installation error: INSTALL_PARSE_FAILED_NO_CERTIFICATES
When I tried to change it back to its previous state, it was still giving me the same error... What have I done?
This is an ugly but fast solution: use JDK 6 instead of 7.
After read Chloe's answer, I uninstalled my JDK 7 (don't need it currently anyways) and installed JDK 6. That fixed it. A better solution would make ant uses JDK 6 (without uninstalling 7). Maybe possible changing / setting this property:
java.library.path
in local.properties file. It's in the project directory (root).
Android doesn't work with JDK 7 anyways (only 6 or 5), so make that the ant script also uses JDK 6 or 5 is probably a good solution.
In my case, I could build and run release builds, but got the
INSTALL_PARSE_FAILED_NO_CERTIFICATES
error when trying to do a debug build.The solution was to delete my
debug.keystore
file and let ADT recreate it. It had apparently expired.A better long-term solution is to explicitly create a
debug.keystore
that does not expire after only a year, instead of letting ADT create it. Here is the command to do that:When prompted, enter these values:
In newer Android Studio versions 3.2+, if you are trying to run
release
install, and you have not defined any signing configurations, it will show the error prompt and install will fail. What you need to do is either run thedebug
build or set up the signing configuration (V1 or V2) correctly.solved (for me) using in keytool the args
and using in jarsigner
solution found in
What kind of pitfals exist for the Android APK signing?
I found that this error can now also occur when using the wrong signing config. As described here, Android 7.0 introduces a new signature scheme, V2. The V2 scheme signs the entire APK rather than just the JAR, as is done in the V1 scheme. If you sign with only V2, and attempt to install on a pre-7.0 target, you'll get this error since the JARs themselves are not signed and the pre-7.0 PackageManager cannot detect the presence of the V2 APK signature.
To be compatible with all target systems, make sure the APK is signed with both schemes by checking both signature version boxes in Android Studio's Generate Signed APK dialog as shown here:
If only 7.0 targets are anticipated, then there is no need to include the V1 signature.
I was having this error in my Eclipse Console. It turns out that I had two jars with the same content but different names and they were conflicting with each other. I just deleted one of them and managed to install the app on the device.