新手求助 react-native run-android 报错



  • E:\weptestprogrammer\rn_douban>react-native run-android
    info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
    Jetifier found 864 file(s) to forward-jetify. Using 8 workers...
    info Starting JS server...
    info Installing the app...
    Downloading https://services.gradle.org/distributions/gradle-5.5-all.zip

    Exception in thread "main" java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"
    at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2085)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
    at org.gradle.wrapper.Download.downloadInternal(Download.java:67)
    at org.gradle.wrapper.Download.download(Download.java:52)
    at org.gradle.wrapper.Install$1.call(Install.java:62)
    at org.gradle.wrapper.Install$1.call(Install.java:48)
    at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
    at org.gradle.wrapper.Install.createDist(Install.java:48)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)

    error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
    Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
    Exception in thread "main" java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"
    at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2085)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
    at org.gradle.wrapper.Download.downloadInternal(Download.java:67)
    at org.gradle.wrapper.Download.download(Download.java:52)
    at org.gradle.wrapper.Install$1.call(Install.java:62)
    at org.gradle.wrapper.Install$1.call(Install.java:48)
    at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
    at org.gradle.wrapper.Install.createDist(Install.java:48)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)

    at checkExecSyncError (child_process.js:621:11)
    at execFileSync (child_process.js:639:15)
    at runOnAllDevices (E:\weptestprogrammer\rn_douban\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
    at buildAndRun (E:\weptestprogrammer\rn_douban\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
    at E:\weptestprogrammer\rn_douban\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Command.handleAction (E:\weptestprogrammer\rn_douban\node_modules\@react-native-community\cli\build\index.js:164:9)****粗体字****


  • @wzq12345678新手求助 react-native run-android 报错 中说:

    Exception in thread "main" java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"

    你设置了某种代理,但这个代理不能正常工作



  • @wzq12345678新手求助 react-native run-android 报错 中说:

    感谢 解决了 系统用的是很早之前安卓环境的gradle 中的配置环境 替换成react-native 的配置就好了 感谢


Log in to reply