[英]react-native : Build failed with an exception
從0.17
升級到0.19
后,每次我嘗試使用( react-native run-android
) build
application
時,我都會收到此錯誤。 我已經嘗試降級到0.17,但它沒有幫助,問題是一樣的。 我也在網上搜索過但找不到與我的問題類似的東西。 我想問題是gradle
而不是本身的react-native
但我不知道如何解決它?
這是錯誤:
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.github.io/react-native/docs/android-setup.html
我感謝任何幫助:)
幾天前我遇到了同樣的問題。 您似乎遇到連接問題,速度緩慢,或者您的ISP阻止了網站(出於任何原因)或者您所在的國家/地區(如中國)進行了過濾。 嘗試使用代理並重試,它對我有用。
順便說一句,問題不在於本地反應,而是與gradle有關。 社區將在v0.21中包含這些帶有react-native軟件包的jar文件,本周即將發布,我希望你的jcenter問題能得到解決。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.