Search code examples
androidandroid-studioapkandroid-install-apkapksigner

Cannot install an already COMPILED & SIGNED Apk file


About the problem

• APK is decompiled and recompiled using APK Easy Tool, it's basically a GUI version of Apktool plus some good stuff like sign or zipalign options.

• This tool gives you 2 options, either Google's (apksigner) or bootstraponline (signapk), if you sign your APK using this latter, the app will work fine on devices but you can't upload it to playstore because of this error : (click to view the image)

• Now when you try to sign the APK using Google's (apksigner), the app doesn't install on devices from the first place :
                                 - Genymotion (click to view the image)
                                 - Android Studio emulator (click to view the image)

What I have tried already

https://stackoverflow.com/a/40064149/9732803
https://developer.android.com/studio/publish/app-signing
https://stackoverflow.com/a/45636921/9732803

*EDIT

@Arnold Parge #comment is right!
And to be honest i don't know what's the reason behind this, now my new question is considering that my APK minSkdVersion is 16 & the targetSdkVersion is 27, if i upload the APK to the playstore, will my app support most of API levels from 16 to 27+ ?

EMULATORS (Genymotion, BlueStacks, Android Studio Emulator)

• Samsung Galaxy S3    - API 16 (4.4.1) => WORKING!
• BlueStacks 3                - API 19 (4.4.2) => Not Working!
• Google Nexus 7           - API 21 (5.0.0) => Not Working!
• Google Nexus 5           - API 24 (7.0) => Not Working!

REAL DEVICE

• Samsung Galaxy J1    - API 19 (4.4.4) => WORKING!


Solution

  • On some emulators, release build does not work. Don't worry, go ahead and upload on PlayStore. Btw you can test it on real device though.

    For your new question: It should work on on devices with api levels from 16 to 27. Release builds should always be tested on real devices. Release the app as alpha on PlayStore and ask your people to test it.