运行第一个项目报错

来源:1-2 构建第一个Android App

幕布斯5497210

2021-09-12 22:13

A problem occurred configuring root project 'MyApplication'.

> Could not resolve all dependencies for configuration ':classpath'.

   > Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'Bstek(http://nexus.bsdn.org/content/groups/public/)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.0.2/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details. 

http://img2.mukewang.com/613e0b1f0001807018150890.jpg

写回答 关注

1回答

  • 小狮子
    2021-11-01 15:54:44

    使用阿里云提供的镜像仓库即可:

    maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
    maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
    maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
    maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }


2021Android从零入门到实战(Kotlin版)

移动端大牛带你快速入门Android

18919 学习 · 74 问题

查看课程

相似问题