如何部署和发布使用Google React Native制作的
Android应用程式?
脚步:
>创建然后将密钥库文件复制到android / app
keytool -genkey -v -keystore mykeystore.keystore -alias mykeyalias -keyalg RSA-keysize 2048 -validity 10000
>在.gradle / gradle.properties中设置你的gradle变量
MYAPP_RELEASE_STORE_FILE = mykeystore.keystore
MYAPP_RELEASE_KEY_ALIAS = mykeyalias
MYAPP_RELEASE_STORE_PASSWORD = *****
MYAPP_RELEASE_KEY_PASSWORD = *****
>将签名配置添加到android / app / build.gradle
defaultConfig {…}
signatureConfigs {
发布 {
storeFile文件(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
buildTypes {
发布 {
…
signatureConfig签署配置
}
}
生成你的版本APK cd android&&& ./gradlew assembleRelease
>将android / app / build / outputs / apk / app-release.apk上传到Google Play