我想生成构建apk但是在cd android&& ./gradlew assembleRelease build failed。
有我的信息:
* What went wrong:
Could not list contents of '/Users/sweet/Desktop/phase/ka-
mobile/node_modules/react-native/third-party/glog-0.3.4/test-driver'.
Couldn't follow symbolic link.
我已经将 my-release-key.keystore 放在android / app下 并更改 android / app / build.gradle
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.kickavenue"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
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
}
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
}
并更改 android / gradle.properties 或更改 〜/ .gradle / gradle.properties < / p>
android.useDeprecatedNdk=true //only on android/gradle.properties i write
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
MYAPP_RELEASE_KEY_ALIAS=my-key-alias
MYAPP_RELEASE_STORE_PASSWORD=sample
MYAPP_RELEASE_KEY_PASSWORD=sample
我的步骤是构建生成的APK
答案 0 :(得分:0)
您使用的是什么版本的RN?此问题出现在RN 0.46.3上,如React Native的github所述:https://github.com/facebook/react-native/issues/14464
您可以升级到React Native 0.47.0来解决问题。
答案 1 :(得分:-1)
尝试删除.bin
node_modules
文件夹