Response-native: build failed with exception

After updating from 0.17 to 0.19 I get this error every time I try to build application using ( react-native run-android ). I tried to downgrade to 0.17, but that did not help, and the problem is the same. I also searched the Internet but could not find anything similar to my problem. I think the problem is gradle not react-native , but I don’t know how to solve it ?!

Here is the error:

 Starting JS server... Starting the packager in a new window is not supported on Windows yet. Please start it manually using 'react-native start'. We believe the best Windows support will come from a community of people using React Native on Windows on a daily basis. Would you be up for sending a pull request? Building and installing the app on the device (cd android && gradlew.bat install Debug)... FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_debugCompile'. > Could not resolve com.facebook.react:react-native:0.19.+. Required by: sess:app:unspecified > Could not resolve com.facebook.react:react-native:0.19.+. > Failed to list versions for com.facebook.react:react-native. > Unable to load Maven meta-data from https://jcenter.bintray.com/co m/facebook/react/react-native/maven-metadata.xml. > Could not GET 'https://jcenter.bintray.com/com/facebook/react/r eact-native/maven-metadata.xml'. > Connection to https://jcenter.bintray.com refused * Try: Run with —stacktrace option to get the stack trace. Run with —info or —debug option to get more log output. BUILD FAILED Total time: 48.737 secs 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.imtqy.com/react-native/docs/android-setup.html 

I appreciate any help :)

+5
source share
1 answer

I had the same problem a few days ago. It looks like you have a connection problem, slow, or the site is blocked by your provider (for some reason) or filtered by your country (for example, china). Try using a proxy server and try again, it worked for me.

By the way, the problem is not in the native response, it's with gradle. And the community will include these jar files with adaptive package in v0.21, which will appear this week, and your problem with jcenter will be solved. I hope so.

+7
source

Source: https://habr.com/ru/post/1242990/


All Articles