[转]解决Android studio升级到3.5的一些问题

最近Android studio升级到最新的3.5以后,出现了很多问题,记录一下:


1.NDK Resolution Outcome: Project settings: Gradle model version=5.4.1, NDK version is UNKNOWN
这个是因为升级到3.5以后,原来的ndk被删除了,在File -> Project Structure -> SDK Location重新安装就好(建议安装,大约750M),会解决很多问题;


2.unable to find valid certification path to requested target
Android studio升级到3.5以后不信任很多链接,应该是还没有配合好,所以导致了现在这样的问题,如果是“http://jcenter.bintray.com/”开头不信任链接,则在project下的build.gradle下按照如下配置:

buildscript {
    repositories {
        google()
        maven { url "https://jitpack.io" }
        jcenter(){url "http://jcenter.bintray.com/"}
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
    }
}

allprojects {
    repositories {
        google()
        maven { url "https://jitpack.io" }
        jcenter(){url "http://jcenter.bintray.com/"}
    }
}
 

如果是以“http://dl.google.com/”开头的话,建议开启vpn,可以多试两次,一般2-3次都可以成功。


---------------------
作者:LspFighting
来源:CSDN
原文:https://blog.csdn.net/qq_33208896/article/details/100100255
版权声明:本文为作者原创文章,转载请附上博文链接!
内容解析By:CSDN,CNBLOG博客文章一键转载插件

发布了113 篇原创文章 · 获赞 69 · 访问量 30万+

猜你喜欢

转载自blog.csdn.net/admans/article/details/103389398
今日推荐