无法使用react-native为android构建

前端之家收集整理的这篇文章主要介绍了无法使用react-native为android构建前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试运行react-native run- android但我不断得到这个错误.我在模拟器上运行.我使用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

原文链接:https://www.f2er.com/react/301078.html

猜你在找的React相关文章