gpt4 book ai didi

android - 无法使用 react-native 为 android 构建

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

我正在尝试运行 react-native run-android 但我不断收到此错误。我正在 emulator 上运行。我使用 react-native init 启动了应用程序。

PS:我在代理上运行。

当我想跑的时候

react-native run-android

我得到:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'AwesomeProject'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:2.2.3.
Required by:
:AwesomeProject:unspecified
> Could not resolve com.android.tools.build:gradle:2.2.3.
> Could not get resource 'https://jcenter.bintray.com/com/android/tool
/build/gradle/2.2.3/gradle-2.2.3.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/buil
/gradle/2.2.3/gradle-2.2.3.pom'. Received status code 407 from server:
Proxy Authentication Required

当我想运行的时候

directly in Android Studio

我得到:

Error:Could not GET 
'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-
2.2.3.pom'. Received status code 407 from server: Proxy Authentication
Required
<a href="toggle.offline.mode">Enable Gradle 'offline mode' and sync
project</a>

我已经安装了我的 node_modules,但我不确定还能尝试什么,过去 4 个小时我一直在谷歌搜索,但一无所获。

最佳答案

在 sdk 管理器中设置您的代理详细信息

AndroidStudio->tools->Android->SDKManager->system settings->Http Proxy

关于android - 无法使用 react-native 为 android 构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46771053/

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