Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App not installed package appears to be corrupted

I've an app created using react native. I am trying to install the app on my device.But showing this error "app not installed -package appears to be corrupted".

What would be the reason? I've tried the following method to build apk.

gradlew assembleRelease.

like image 731
Linu Sherin Avatar asked Dec 08 '17 10:12

Linu Sherin


People also ask

What is the meaning of the package appears to be corrupt?

This is because your previous aplication was build with a higher version of sdk. If your new app was build with 22 and your installed application was build with 23, you will get The package appears to be corrupt error on update.

How do I fix package installer app not installed?

The Android app not installed error can be combated after resetting app permissions. Go to Settings > Apps > Reset App Preferences/Reset Application Permissions. After this, third-party software can be installed on your device.


2 Answers

FOLLOW THESE INSTRUCTIONS ....IT WORKED FOR ME

Prerequisite - You must have a keystore file, If you don't have then Open cmd run keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 follow instructions and you are done.You will have a keystore file. Now follow these steps.

1 .On windows cd android and then run gradlew assembleRelease

2 .Find APK at this location android/app/build/outputs/apk/release/app-release-unsigned.apk

3 .Copy this APK to bin folder of jdk installation directory ( for me directory was C:\Program Files\Java\jdk1.8.0_181\bin ) [ Basically in this step we are trying to go to the same directory as jarsigner]

4 .Also Copy your keystore file to this ( C:\Program Files\Java\jdk1.8.0_181\bin ) directory.

5 .Now Open cmd in Administrator mode and run cd C:\Program Files\Java\jdk1.8.0_181\bin

6 .Now run jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore <<your keystore file name >> <<your apk file name>> alias_name

Here goes your apk , now find your signed apk here cd C:\Program Files\Java\jdk1.8.0_181\bin . Run it, Now it should install.

like image 188
kumar kundan Avatar answered Sep 19 '22 21:09

kumar kundan


For me the reason that my phone already had a version of the app installed on it. Once I remove the app - reinstall the apk it went smoothly.

like image 24
chenop Avatar answered Sep 20 '22 21:09

chenop