I cant install apk from react-native
Its tel me " "App not installed""
I build it use ing
./gradlew assembleRelease
BUILD SUCCESSFUL
Total time: 15.842 secs
This build could be faster, please consider using the Gradle Daemon: http://gradle.org/docs/2.4/userguide/gradle_daemon.html
I STFW
and I find this
https://github.com/facebook/react-native/issues/4421
and this
Unable to install signed apk from React Native
but Didn't solve the problem
The documentation in the link that you've shared:
I use this to sine my apk facebook.github.io/react-native/docs/signed-apk-android.html and I try unsine apk but its the same
Is not complete and does not sign your APK file.
As seen here:
Android requires that all apps be digitally signed with a certificate before they can be installed, so to distribute your Android application via Google Play store, you'll need to generate a signed release APK. The Signing Your Applications page on Android Developers documentation describes the topic in detail. This guide covers the process in brief, as well as lists the steps required to packaging the JavaScript bundle.
gradlew assembleRelease
will only build/bundle your application for production. You need to sign the APK file yourself.
These are the steps which I take when I want to run my application in production mode:
keytool -genkey -v -keystore key.keystore -alias app-alias -keyalg RSA -keysize 2048 -validity 10000
cd android && gradlew assembleRelease && cd ..
jarsigner -verbose -keystore \path_to_key\key.keystore \path_to_apk\app-release-unsigned.apk app-alias
zipalign -f -v 4 \path_to_apk\app-release-unsigned.apk appName.apk
Follow these steps and your app should be installed successfully.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With