0

I keep getting the error:

DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.unacademy.debug"
        pkg: /data/local/tmp/com.unacademy.debug
        Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]


        Installation failed since the APK was either not signed, or signed incorrectly.
        If this is a Gradle-based project, then make sure the signing configuration is specified in the Gradle build script.

It happens on all devices on all build variants (they use the same config though). Running "Generate Signed APK" from android studio works fine as I use another key.

EDIT:

I did in fact add a library compile 'org.swinglabs:pdf-renderer:1.0.5'. Removing this, and rebuilding solves the problem.

Part of the build.gradle:

signingConfigs {
    debug {
        keyPassword 'hello123'
        storeFile file('debug_new.jks')
        storePassword 'hello123'
        keyAlias 'debug'
    }
Vedant Agarwala
  • 18,146
  • 4
  • 66
  • 89

1 Answers1

0

Did you edit the AndroidManifest.xml directly in the .apk file? If so, that won't work.

Every Android .apk needs to be signed if it is going to be installed on a phone, even if you're not installing through the Market. The development tools work round this by signing with a development certificate but the .apk is still signed.

One use of this is so a device can tell if an .apk is a valid upgrade for an installed application, since if it is the Certificates will be the same.

So if you make any changes to your app at all you'll need to rebuild the .apk so it gets signed properly.

ashif-ismail
  • 1,037
  • 17
  • 34