verifyReleaseResources apk版本-本机反应

时间:2018-12-13 07:42:09

标签: android react-native

我要使用以下命令释放我的apk:

sudo ./gradlew assembleRelease -x bundleReleaseJsAndAssets

但我收到此错误消息:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-contacts:verifyReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

我的反应版本:

"react": "16.3.1",
"react-native": "0.55.4",

2 个答案:

答案 0 :(得分:5)

解决了。

将此添加到android / build.gradle文件的末尾:

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion rootProject.ext.compileSdkVersion
                buildToolsVersion rootProject.ext.buildToolsVersion
            }
        }
    }
}

答案 1 :(得分:0)

我面临着同样的问题。只需运行此命令

  

./ gradlew app:assembleRelease