虾仁A 2022-03-28 14:33 采纳率: 78.8%
浏览 55
已结题

构建Android Studio出现错误

问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
Configuration on demand is an incubating feature.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Project'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:4.2.2.
     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle:4.2.2.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom'.
               > Connect to ubuntu.buct.cn:80 [ubuntu.buct.cn/124.206.29.168] failed: Connection timed out: connect
      > Could not resolve com.android.tools.build:gradle:4.2.2.
         > Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom'.
            > Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom'.
               > Connect to ubuntu.buct.cn:80 [ubuntu.buct.cn/124.206.29.168] 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 2m 23s

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

运行结果及报错内容

都不知道什么意思,
感觉应该是gradle构建时卡死了

我的解答思路和尝试过的方法
我想要达到的结果
  • 写回答

3条回答 默认 最新

  • 不会写代码的猴子 Android领域优质创作者 2022-03-28 14:51
    关注

    build.gradle(Project)

    allprojects {
        repositories {
            mavenCentral()
            google()
            maven {url "https://jitpack.io"}
        }
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 4月6日
  • 已采纳回答 3月29日
  • 创建了问题 3月28日

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料