"Application not installed" when APK is not signed
I wanted to test a small android app which I was working on, on my phone. I had already tested this app on an emulator and even on a physical device - my phone earlier, but I had done that via ADB. However, I wanted to install it this time from the apk file. Now, when I ran
there were 2 apk files generated in the
I was a bit confused looking at the message, I didn't quite understand what went wrong as there was no details as to what went wrong in the message. I had pretty much everything configured the way I thought would be required like checking off the box against "Allow installation from unknown sources".
After trying out a couple of things, I found this option called "Generate signed APK" under the "Build" menu item in Android Studio. Using this option, I had to create a new keystore and a new key to be used in order to sign the APK. Apparently, an APK needs to be signed for it to be installed onto a device. Following the wizards to create te keystore and the key was a breeze.
And finally now, it had generated an APK file for me which was signed as well. This APK, installed without any problems on my phone, and the app was running as well!
gradlew assembleRelease
there were 2 apk files generated in the
projectname/build/apk
directory. One named projectname-debug-unaligned.apk
and the other named projectname-release-unsigned.apk
. The release unsigned one seemed to be the right one to try out. So I tried installing it on my phone. Everything went on well until I saw a message when it had just seemed like the app was installed which actually read: "Application not installed".I was a bit confused looking at the message, I didn't quite understand what went wrong as there was no details as to what went wrong in the message. I had pretty much everything configured the way I thought would be required like checking off the box against "Allow installation from unknown sources".
After trying out a couple of things, I found this option called "Generate signed APK" under the "Build" menu item in Android Studio. Using this option, I had to create a new keystore and a new key to be used in order to sign the APK. Apparently, an APK needs to be signed for it to be installed onto a device. Following the wizards to create te keystore and the key was a breeze.
And finally now, it had generated an APK file for me which was signed as well. This APK, installed without any problems on my phone, and the app was running as well!
Comments
Post a Comment