简体   繁体   English

verifyReleaseResources apk版本-本机反应

[英]verifyReleaseResources apk release - react native

I want to release my apk with this command: 我想用以下命令释放我的apk:

sudo ./gradlew assembleRelease -x bundleReleaseJsAndAssets

but I got this error message: 但我收到此错误消息:

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

my react versions: 我的反应版本:

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

solved. 解决了。

add this to the end of android/build.gradle file: 将此添加到android / build.gradle文件的末尾:

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

I was facing the same problem, add the following lines of code in your android/build.gradle file 遇到了同样的问题,请在您的android / build.gradle文件中添加以下代码行

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

If that doesn't work in your case then run the following command for a temporary solution 如果您的情况不起作用,请运行以下命令以寻求临时解决方案

./gradlew app:assembleRelease ./gradlew应用程序:assembleRelease

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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