gpt4 book ai didi

android - react native : Build failed with an exception

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:49:41 24 4
gpt4 key购买 nike

0.17 升级到 0.19 之后,每次我尝试构建 应用程序<时都会遇到这个错误 使用 ( react-native run-android )。我试过降级回 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(出于任何原因)阻止或被您所在的国家/地区(如中国)过滤。尝试使用代理并重试,它对我有用。

顺便说一下,问题不在于 react-native,而在于 gradle。社区将在本周发布的 v0.21 中包含这些带有 react-native 包的 jar 文件,我希望你的 jcenter 问题将得到解决。

关于android - react native : Build failed with an exception,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35394570/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com