简体   繁体   中英

React Native: How to generate an APK?

I'm trying to generate a test APK.

  1. cmd: create-react-native-app AwesomeProject
  2. cmd: cd AwesomeProject
  3. cmd: keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000

  4. Created a folder(android/app), put the file my-release-key.keystore.

  5. In the documentation:

    Edit the file ~/.gradle/gradle.properties and add the following (replace ***** with the correct keystore password, alias and key password)

    I do not have this file, how do I get it?

The documentation you are following is for app that created with react-native-cli and your app is created with create-react-native-app . To build and publish your app you either need to eject your app or follow this documentation .

Sharing and Deployment

Create React Native App does a lot of work to make app setup and development simple and straightforward, but it's very difficult to do the same for deploying to Apple's App Store or Google's Play Store without relying on a hosted service.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM