Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.1k views
in Technique[技术] by (71.8m points)

yarn android时,获取连接报错

Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command\_line\_interface.html#sec:command\_line\_warnings

FAILURE: Build failed with an exception.

 What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
 > Could not resolve androidx.multidex:multidex:2.0.0.
 Required by:
 project :app
 > Could not resolve androidx.multidex:multidex:2.0.0.
 > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/multidex/multidex/2.0.0/multidex-2.0.0.pom'.
 > Could not GET 'https://dl.google.com/dl/android/maven2/androidx/multidex/multidex/2.0.0/multidex-2.0.0.pom'.
 > Connect to dl.google.com:443 [dl.google.com/203.208.46.146] failed: Connection timed out: connect
 > Could not resolve androidx.swiperefreshlayout:swiperefreshlayout:1.0.0.
 Required by:
 project :app
 project :app > com.facebook.react:react-native:0.63.4
 > Could not resolve androidx.swiperefreshlayout:swiperefreshlayout:1.0.0.
 > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/swiperefreshlayout/swiperefreshlayout/1.0.0/swiperefreshlayout-1.0.0.pom'.
 > Could not GET 'https://dl.google.com/dl/android/maven2/androidx/swiperefreshlayout/swiperefreshlayout/1.0.0/swiperefreshlayout-1.0.0.pom'.
 > Connect to dl.google.com:443 [dl.google.com/203.208.46.146] failed: Connection timed out: connect
 > Could not resolve androidx.appcompat:appcompat:1.0.2.
 Required by:
 project :app > project :react-native-audio
 > Could not resolve androidx.appcompat:appcompat:1.0.2.
 > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom'.
 > Could not GET 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom'.
 > Connect to dl.google.com:443 [dl.google.com/203.208.46.146] failed: Connection timed out: connect
 > Could not resolve androidx.appcompat:appcompat:1.0.2.
 Required by:
 project :app > com.facebook.react:react-native:0.63.4
 > Could not resolve androidx.appcompat:appcompat:1.0.2.
 > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom'.
 > Could not GET 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom'.
 > Connect to dl.google.com:443 [dl.google.com/203.208.46.146] failed: Connection timed out: connect
 > Could not resolve androidx.appcompat:appcompat:1.0.2.
 Required by:
 project :app > com.github.czy1121:settingscompat:1.1.4
 > Could not resolve androidx.appcompat:appcompat:1.0.2.
 > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom'.
 > Could not GET 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom'.
 > Connect to dl.google.com:443 [dl.google.com/203.208.46.146] failed: Connection timed out: connect

 Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

 Get more help at https://help.gradle.org

BUILD FAILED in 45m 43s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

问题出现的环境背景及自己尝试过哪些方法

  1. 已执行过tyarn命令
  2. 试过翻墙软件
  3. 更改过host文件
  4. 如下图所示configuring执行了50多分钟 然后有了上文的报错

ps: 这些依赖好像都是用的implementation引入的

image


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...