React Native Android Project package release APK step

Source: Internet
Author: User

1, the key to generate the signature

This process will be used keytool , the development of Android should have been exposed to the thing. See Key and certificate management tools for details.
Execute in the project's home directory (not the Android folder):

--Generate signature key, note your key and store password, the following configuration file needs to use Keytool-genkey-v-keystore my-release-key. Keystore-alias My-key-alias- Keyalg rsa-keysize 2048-validity 10000--move keystore files to Android/app/ folder  move My-release-key.keystore   android/app/
2. Modificationandroid/gradle.propertiesFile, add the following
Myapp_release_store_file=my-release-key. Keystoremyapp_release_key_alias=My-key-aliasmyapp_release_store_password=xx Myapp_release_key_password=xx[Note replace the key and store password set by XX for yourself]
3. Modificationandroid/app/build.gradleSignature configuration in the file:
... 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     }   }   buildtypes {     RELEASE {       ...        signingconfig signingconfigs.  release     }    }}
4. Then go to the Android directory to perform the following:
Gradlew Assemblerelease

will be at the end android/app/build/outputs/apk/文件夹中生产可以发布的app-release.apk文件 .

React Native Android Project package release APK step

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.