gpt4 book ai didi

react-native - react native : "A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade"

转载 作者:行者123 更新时间:2023-12-04 12:02:13 25 4
gpt4 key购买 nike

我创建了一个新的 React Native 项目并运行了 react-native run-android .
但是,我收到此错误:A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade这是屏幕截图:
error 1
这是我的 android/build.gradle :

 // Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext {
buildToolsVersion = "29.0.2"
minSdkVersion = 16
compileSdkVersion = 29
targetSdkVersion = 29
}
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:3.5.3")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}

google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}
我是 React Native 的新手,这是一个新项目,因此将不胜感激。

最佳答案

值得注意的是,我在原生(Kotlin)Android 项目中遇到了这个问题。
对我来说,这是由我的 resConfigs 中指定的密度引起的。 :

build.grade (:app)

developLint {
dimension "version"
resConfigs "en", "he-rIL", "iw-rIL", "xxhdpi"
}
(注意上面的 "xxhdpi")
去除密度解决了这个问题。

关于react-native - react native : "A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64676248/

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