Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I cant install apk from react-native Its tel me " "App not installed""اا

Tags:

react-native

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

like image 285
I will try Avatar asked Sep 06 '25 03:09

I will try


1 Answers

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:

  1. keytool -genkey -v -keystore key.keystore -alias app-alias -keyalg RSA -keysize 2048 -validity 10000
  2. cd android && gradlew assembleRelease && cd ..
  3. jarsigner -verbose -keystore \path_to_key\key.keystore \path_to_apk\app-release-unsigned.apk app-alias
  4. zipalign -f -v 4 \path_to_apk\app-release-unsigned.apk appName.apk

Follow these steps and your app should be installed successfully.

like image 142
Ray Avatar answered Sep 07 '25 21:09

Ray