最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Running react native bare project results in error A problem occurred configuring project ':react-native-re

programmeradmin0浏览0评论

I have installed react native through the expo kit and now when I run yarn run android I received that error. I haven't changed anything on the template. I don't know what is happening.? If there are further about feel free to ask. I have also checked the build.gradle of react native reanimated but ,unfortunately , no success has shown up.

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 

BUILD FAILED in 28s

error Failed to install the app. Make sure you have the Android development environment set up: .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 

BUILD FAILED in 28s

I have installed react native through the expo kit and now when I run yarn run android I received that error. I haven't changed anything on the template. I don't know what is happening.? If there are further about feel free to ask. I have also checked the build.gradle of react native reanimated but ,unfortunately , no success has shown up.

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
Share Improve this question asked Apr 18, 2020 at 8:15 Deyvid PopovDeyvid Popov 1311 gold badge1 silver badge6 bronze badges 2
  • 1 It's not only this lib, I have removed and now the error is in react-native screen – Deyvid Popov Commented Apr 18, 2020 at 8:41
  • 1 Facing same issue, any solution. – Swift Commented Aug 31, 2020 at 18:22
Add a comment  | 

4 Answers 4

Reset to default 5

You have install Android API level 29 and reopen the project... then it will fix itself.

Just go to sdk manager from android studio and install android 10.0(Q) level 29 , show package details google apis intelx86 Atom system image

and restart android studio and open the project it will work... image

You need to setup your development environment for react native. Use the following link

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

Also check the jdk version it should be above or 11.0

The below mentioned code inside build.gradle (node_modules\react-native-reanimated\android\build.gradle) is problematic:

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

If this is replaced with the below mentioned code, the said problem is fixed.

android.libraryVariants.all { variant ->
        def name = variant.name.capitalize()
        task "jar${name}"(type: Jar, dependsOn: variant.javaCompile) {
            from variant.javaCompile.destinationDir
        }
}

In my case, on windows, was the wrong Android SDK path on local.properties file. Needs double backslashes

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论