gpt4 book ai didi

android - 构建 Android React Native 时网关错误

转载 作者:行者123 更新时间:2023-12-04 23:47:17 26 4
gpt4 key购买 nike

当我运行 react-native run-android ,我收到以下错误:

* What went wrong:
Could not determine the dependencies of task ':react-native-intercom:generateDebugRFile'.
> Could not resolve all task dependencies for configuration ':react-native-intercom:debugRuntimeClasspath'.
> Could not resolve com.facebook.react:react-native:+.
Required by:
project :react-native-intercom
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from https://dl.bintray.com/intercom/intercom-maven/com/facebook/react/react-native/maven-metadata.xml.
> Could not get resource 'https://dl.bintray.com/intercom/intercom-maven/com/facebook/react/react-native/maven-metadata.xml'.
> Could not GET 'https://dl.bintray.com/intercom/intercom-maven/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
我看到其他人遇到过类似的问题,他们说要检查状态: https://status.bintray.com/ - 但它是说一切正常。我还为 bintray 搜索了整个代码库,但没有引用它。
编辑:
还在浏览器中尝试了该 URL 并获得相同的 502
还:
dara@dara-beast:~/DAD/rn-app$ curl http://dl.bintray.com/intercom/intercom-maven/com/facebook/react/react-native/maven-metadata.xml
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>


dara@dara-beast:~/DAD/rn-app$ curl https://dl.bintray.com/
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>

更新
看来 bintray 已经“落日”了,所以我不希望它回来。我已替换 jcenter()mavenCentral()它似乎有帮助,但我仍然收到如下错误:
* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not find com.facebook.yoga:proguard-annotations:1.14.1.
Searched in the following locations:
- file:/home/dara/.m2/repository/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
- file:/home/dara/DAD/rn-app/node_modules/react-native/android/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
- file:/home/dara/DAD/rn-app/node_modules/jsc-android/dist/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
- https://dl.google.com/dl/android/maven2/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
- https://repo.maven.apache.org/maven2/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
- https://www.jitpack.io/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
- https://maven.google.com/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
- https://sdk.squareup.com/public/android/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
Required by:
project :app > com.facebook.react:react-native:0.63.4
> Could not find com.facebook.fbjni:fbjni-java-only:0.0.3.
Searched in the following locations:
- file:/home/dara/.m2/repository/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
- file:/home/dara/DAD/rn-app/node_modules/react-native/android/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
- file:/home/dara/DAD/rn-app/node_modules/jsc-android/dist/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
- https://dl.google.com/dl/android/maven2/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
- https://repo.maven.apache.org/maven2/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
- https://www.jitpack.io/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
- https://maven.google.com/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
- https://sdk.squareup.com/public/android/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
Required by:
project :app > com.facebook.react:react-native:0.63.4
我试图在构建文件中排除 Yaga 和其他人,但它不起作用。我不知道该怎么做。

最佳答案

我不建议依赖 JCenter,过去几周它一直不稳定。
有一个official library现在来自 React-Native 的 Intercom!它使用新的 mavenCentral repo,并且这和 react-native-intercom 之间几乎没有区别(我发现) .方法是一样的。您可能希望迁移到它。

关于android - 构建 Android React Native 时网关错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70175740/

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