首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运行react native bare项目导致错误配置项目':react-native-reanimated‘时出现问题

运行react native bare项目导致错误配置项目':react-native-reanimated‘时出现问题
EN

Stack Overflow用户
提问于 2020-04-18 16:15:12
回答 4查看 10.1K关注 0票数 11

我已经通过expo工具包安装了react native,现在当我运行yarn run android时,我收到了这个错误。我没有更改模板上的任何内容。我不知道发生了什么。如果还有更多的问题,请随时询问。我还检查了react native reanimated的build.gradle,但不幸的是,没有成功。

代码语言:javascript
复制
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
EN

回答 4

Stack Overflow用户

发布于 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

票数 4
EN

Stack Overflow用户

发布于 2020-05-20 09:07:26

您需要为react原生设置开发环境。使用以下链接

https://reactnative.dev/docs/environment-setup

还要检查jdk版本是否应高于或高于11.0

票数 0
EN

Stack Overflow用户

发布于 2021-01-31 20:49:24

下面提到的build.gradle (node_modules\react-native-reanimated\android\build.gradle)中的代码有问题:

代码语言:javascript
复制
android.libraryVariants.all { variant ->
        def name = variant.name.capitalize()
        task "jar${name}"(type: Jar, dependsOn: variant.javaCompileProvider.get()) {
            from variant.javaCompileProvider.get().destinationDir
        }
}

如果将其替换为下面提到的代码,则可以修复上述问题。

代码语言:javascript
复制
android.libraryVariants.all { variant ->
        def name = variant.name.capitalize()
        task "jar${name}"(type: Jar, dependsOn: variant.javaCompile) {
            from variant.javaCompile.destinationDir
        }
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61286117

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档