我已经通过expo工具包安装了react native,现在当我运行yarn run android时,我收到了这个错误。我没有更改模板上的任何内容。我不知道发生了什么。如果还有更多的问题,请随时询问。我还检查了react native reanimated的build.gradle,但不幸的是,没有成功。
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\David\Desktop\TheGuruApp\node_modules\react-native-reanimated\android\build.gradle' line: 89
* What went wrong:
A problem occurred configuring project ':react-native-reanimated'.
> java.io.IOException: The filename, directory name, or volume label syntax is incorrect
* 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
BUILD FAILED in 28s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\David\Desktop\TheGuruApp\node_modules\react-native-reanimated\android\build.gradle' line: 89
* What went wrong:
A problem occurred configuring project ':react-native-reanimated'.
> java.io.IOException: The filename, directory name, or volume label syntax is incorrect
* 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
BUILD FAILED in 28s发布于 2021-02-18 17:18:49
您已经安装了Android API level 29并重新打开了项目...然后它就会自动修复。
只需从android studio转到sdk manager并安装Android10.0(Q) level 29,显示包详细信息google intelx86 Atom系统镜像
并重新启动android studio并打开项目,它将正常工作……image
发布于 2020-05-20 09:07:26
发布于 2021-01-31 20:49:24
下面提到的build.gradle (node_modules\react-native-reanimated\android\build.gradle)中的代码有问题:
android.libraryVariants.all { variant ->
def name = variant.name.capitalize()
task "jar${name}"(type: Jar, dependsOn: variant.javaCompileProvider.get()) {
from variant.javaCompileProvider.get().destinationDir
}
}如果将其替换为下面提到的代码,则可以修复上述问题。
android.libraryVariants.all { variant ->
def name = variant.name.capitalize()
task "jar${name}"(type: Jar, dependsOn: variant.javaCompile) {
from variant.javaCompile.destinationDir
}
}https://stackoverflow.com/questions/61286117
复制相似问题