舒心、快乐,比什么都重要

AndroidStudio 集成kotlin,以及Kotlin-gradle-plugin-1.5.0.jar 下载失败

配置Kotlin

复制代码
buildscript {
    ext.kotlin_version = '1.5.0'

    repositories {

        maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        google()
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.2.1"

        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()
        mavenCentral()
//        jcenter() // Warning: this repository is going to shut down soon

        maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}
    }
}
复制代码

 

app build.Gradle 

引用最新包

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

 

网络不好,所以我把jcenter()换成了阿里云的包

这样就能吧kotlin引入到工程

 

posted @   Arcturis  阅读(834)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· 实操Deepseek接入个人知识库
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· 【.NET】调用本地 Deepseek 模型
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
点击右上角即可分享
微信分享提示