React native APK package Android

Time:2019-11-8
  1. Find the installation path of javajdkxx.xx.xxxxbin

React native APK package Android
As shown in the figure, here is C: program filesjavajdk1.8.0
CD C: program filesjavajdk1.8.0, enter C: program filesjavajdk1.8.0, execute
keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000

React native APK package AndroidThis should succeed. A keystore file called my-release-key.keystore will be generated

React native APK package Android

2. Set gradle variable
Put the newly generated my-release-key.keystore file in the Android / APP folder of your project. Then edit C / users / username /. Gradle / gradle.properties (global configuration, valid for all projects) or project directory / Android / gradle.properties (project configuration, valid only for the project). If you don’t have the gradle.properties file, create one yourself, and add the following code (note that**Replace with the corresponding password)
Like mine
React native APK package Android
3. Add signature configuration to the gradle configuration of the project
Edit Android / APP / build.gradle in your project directory, and add the following signature configuration:
This is on the official website
React native APK package Android
Mine isReact native APK package Android

4. generate apk
$ cd android
$ ./gradlew assembleRelease
(CD Android means to enter the Android directory (if you are already in the Android directory, you don’t need to enter it). . / gradlew assemblyrelease in Mac OS, Linux or windows PowerShell environment means to execute the script file named gradlew in the current directory, and its running parameter is assemblyrelease. Note that. / cannot be omitted; it needs to be removed under the traditional CMD command line of windows. /)
Under the diagram
React native APK package Android

The generated APK file is located in Android / APP / build / outputs / APK / release / app-release.apk, which can already be used for publishing.
React native APK package Android

Recommended Today

The use of progressbarcontrol, a progress bar control of devexpress – Taking ZedGraph as an example to add curve progress

scene WinForm control – devexpress18 download installation registration and use in vs: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/100061243 When using ZedGraph to add curves, the number of curves is slower if there are many cases. So in the process of adding curve, the progress needs to be displayed, and the effect is as follows     Note: Blog home page:https://blog.csdn.net/badao_liumang_qizhi […]