欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

Android开发遇见的问题-kotlin

程序员文章站 2022-04-17 08:59:03
新建项目时报错:unable to find valid certification path to requested target这个问题应该是和版本相关的我的AndroidStudio 版本是3.5.3,build.gradle中这样修改。// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { ext.kotli...
  1. 新建项目时报错:unable to find valid certification path to requested target
    这个问题应该是和版本相关的我的AndroidStudio 版本是3.5.3,build.gradle中这样修改。
    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    
    buildscript {
        ext.kotlin_version = '1.3.50'
        repositories {
    //        google()
    //        jcenter()
            mavenCentral()
            maven { url 'https://maven.google.com' }
            google()
            jcenter()
            maven { url "https://jitpack.io" }
            
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.5.0'
            classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files·
        }
    }
    
    allprojects {
        repositories {
    //        google()
    //        jcenter()
            mavenCentral()
            maven { url 'https://maven.google.com' }
            google()
            jcenter()
            maven { url "https://jitpack.io" }
        }
    }
    
    task clean(type: Delete) {
        delete rootProject.buildDir
    }
    

     

  2.  

本文地址:https://blog.csdn.net/weixin_42415553/article/details/109646129

相关标签: AS android