According to the official 5-Step song:
1. Inside the terminal, the CD is behind the project's root directory. Execute the following line:
2048 10000
The terminal will then let you enter information such as a password.
2. The first step is to generate a Xxxxxx.keystore file in the root directory and get it directly under Android/app.
3. In the Android/gradle.properties, add:
myapp_release_store_file=my-release-key.keystoremyapp_release_key_alias=my-key-AliasMYAPP_RELEASE _store_password=******myapp_release_key_password=******
Change to the password you just entered.
4. Add the following red word in Android/app/build.gradle.
Android {... Defaultconfig {... } Signingconfigs { release { storefile file (myapp_release_store_file) Storepassword myapp_ Release_store_password keyalias myapp_release_key_alias keypassword myapp_release_key_password }} splits {... } Buildtypes { Release { signingconfig signingconfigs.release ... } } ..... } } }}
5. Terminal CD to the Android directory. Execute command
./gradlew Assemblerelease
Wait a minute. Display build successful after the terminal executes.
It's done. Under the android/app/outputs/apk of the project, just hit the apk bag.
React Native Android Pack apk