当前位置: 首页 > 知识库问答 >
问题:

任务“:App:ProcessDebugResources”执行失败。反应本机[重复]

陆啸
2023-03-14

我在“React-Native Run-Android”上面临这个问题。我没有工作我的代码大约2个月。今天,我不得不做一些改变。但我不能在模拟器上运行。

JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...

> Configure project :app 
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

> Configure project :react-native-image-crop-picker 
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

/Users/{{username}}/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/8ff87d77ddde6374a9d9faf5f292366f/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontVariationSettings not found.

/Users/{{username}}/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/8ff87d77ddde6374a9d9faf5f292366f/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/ttcIndex not found.

error: failed linking references.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Failed to process resources, see aapt output above for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUİLD FAILED in 2s
53 actionable tasks: 1 executed, 52 up-to-date
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html

Android/Build.Gradle

ext {
        buildToolsVersion = "27.0.3"
        minSdkVersion = 16
        compileSdkVersion = 27
        targetSdkVersion = 26
        supportLibVersion = "27.1.1"
    }

共有1个答案

段干宾白
2023-03-14

尝试将compileSdkVersion更改为:

compileSdkVersion 28

fontVariationSettings是api级别28。来源

 类似资料: