android studio这个问题困扰我一天一夜了

img


完全不懂的人第一次上手,这个玩意到底哪出问题了,人都麻了,试遍了百度上的各种办法都不行

没遇到过。
不过你可以补充一下遇到问题的经过,好让大家出对策。
1、是否第一次安装Android Studio
2、是否安装Studio全量包,全量包是有SDK的
3、这个报错是复制过来的项目还是自己新建的项目

你更新包的地址换一下,我记得在gradel里面
我用#CSDN#这个app发现了有技术含量的博客,小伙伴们求同去《新手android studio换源》, 一起来围观吧 https://blog.csdn.net/qq_43296009/article/details/110950121?utm_source=app&app_version=5.0.1&code=app_1562916241&uLinkId=usr1mkqgl919blen

不知道你参考的是哪里的教程配置的?
Android Studio很久没弄了,不过记得有部分配置是从谷歌拉取的,需要更换源.

不过你现在这个问题,是因为http的问题,
解决办法如下
对于 Gradle 7+ 版本中的不安全 HTTP 连接,我们需要将布尔值allowInsecureProtocol指定为 true 以MavenArtifactRepository关闭。
由于您已收到sonatype存储库的此错误,因此您需要按如下方式设置存储库:

Groovy DSL

repositories {
    maven {
        url "http://oss.sonatype.org/content/repositories/snapshots"
        allowInsecureProtocol = true // 添加这一行
    }
    // other repositories ...
}

或者将你url里面的http://改为https://,当然,前提是这个仓库源本身支持https协议

build.gradle文件


buildscript {

    repositories {
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        maven { url "https://jitpack.io" }
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        maven { url "https://jitpack.io" }
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

gradle/wrapper/gradle-wrapper.properties

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists


按上面的改一下再rebulid

在idea.properties文件里添加
disable.android.first.run=true
试试看

可以把相关详细的异常贴上。题主遇到的问题肯定不是个例

img

img


会不会是这两个地方有问题啊

是不是debug编译的签名有问题?

安卓开发:解决Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration等问题
https://blog.csdn.net/CaiNiao_hu/article/details/120263811