Raquelcldba / AplicativoManuelzao

Aplicativo para monitoramento e cadastramento de cursos d'água e nascentes.
0 stars 0 forks source link

Gerar arquivo apk - android #4

Open Raquelcldba opened 7 years ago

Raquelcldba commented 7 years ago

Generating Signed APK - https://facebook.github.io/react-native/docs/signed-apk-android.html create a key to sign the apk - http://stackoverflow.com/questions/35935060/how-can-i-generate-an-apk-that-can-run-without-server-with-react-native

down vote You will have to create a key to sign the apk. Use below to create your key:

keytool -genkey -v -keystore my-app-key.keystore -alias my-app-alias -keyalg RSA -keysize 2048 -validity 10000 Use a password when prompted

Once the key is generated, use it to generate the installable build:

react-native bundle --platform android --dev false --entry-file index.android.js \ --bundle-output android/app/src/main/assets/index.android.bundle \ --assets-dest android/app/src/main/res/ Generate the build using gradle

cd android && ./gradlew assembleRelease Upload the APK to your phone. The -r flag will replace the existing app (if it exists)

adb install -r ./app/build/outputs/apk/app-release-unsigned.apk A more detailed description is mentioned here: https://facebook.github.io/react-native/docs/signed-apk-android.html