我想從Windows生成一個簽名APK以在真實手機中測試。我完成了應用程序的開發,但是當我編譯並嘗試在我的android手機中安裝時,它說「無法安裝此應用程序」。從React Native中的Windows生成APK
我有點糊塗了以下這一點:https://facebook.github.io/react-native/docs/signed-apk-android.html
我找不到〜/ .gradle/gradle.properties
和我的Android /應用/的build.gradle可是沒有了Android一詞喜歡這裏:
android {
...
defaultConfig { ... }
signingConfigs {
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
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
}
}
}
誰能幫助我,請
編輯1:我的build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
你是否在Android應用程序文件夾中保存了你的發行密鑰庫文件? –
是的,但它不工作:/ – user3672894