gpt4 book ai didi

react-native - 升级React Native后出现 “verifyReleaseResources”错误

转载 作者:行者123 更新时间:2023-12-03 08:55:28 44 4
gpt4 key购买 nike

我正在尝试将应用程序升级到React Native 0.57.1​​。我认为我已经按照所有步骤操作,升级了所有正确的文件,但是仍然出现我无法理解的错误:

:react-native-document-picker:compileReleaseSources UP-TO-DATE
:react-native-document-picker:mergeReleaseResources UP-TO-DATE
:react-native-document-picker:verifyReleaseResourcesC:\Users\USERNAME\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\b3b5480809d523e6f8b8de92faafbcda\res\values-v26\values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.

C:\Users\USERNAME\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\b3b5480809d523e6f8b8de92faafbcda\res\values-v26\values-v26.xml:13:5-16:13: AAPT: error: resource android:attr/colorError not found.

C:\Users\USERNAME\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\b3b5480809d523e6f8b8de92faafbcda\res\values-v26\values-v26.xml:17:5-93: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.

C:\Users\USERNAME\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\b3b5480809d523e6f8b8de92faafbcda\res\values\values.xml:251:5-69: AAPT: error: resource android:attr/fontStyle not found.

C:\Users\USERNAME\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\b3b5480809d523e6f8b8de92faafbcda\res\values\values.xml:251:5-69: AAPT: error: resource android:attr/font not found.

C:\Users\USERNAME\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\b3b5480809d523e6f8b8de92faafbcda\res\values\values.xml:251:5-69: AAPT: error: resource android:attr/fontWeight not found.


error: failed linking references.
:react-native-document-picker:verifyReleaseResources FAILED

FAILURE: Build failed with an exception.

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

我真的无法理解这些错误,知道它们是什么意思吗?我如何找出解决方法?

我尝试了各种方法,包括删除.cache目录,更改gradle版本,但似乎无济于事。任何想法?

最佳答案

您需要在项目的android / build.gradle中添加以下代码:

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

关于react-native - 升级React Native后出现 “verifyReleaseResources”错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52613089/

44 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com