我正在从kotlin使用,但是当我在项目中同步它时,出现波纹管错误:
Error:Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.2-3.Searched in the following locations: file:/D:/androID-studio/gradle/m2repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.1.2-3/kotlin-gradle-plugin-1.1.2-3.pom file:/D:/androID-studio/gradle/m2repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.1.2-3/kotlin-gradle-plugin-1.1.2-3.jar https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.1.2-3/kotlin-gradle-plugin-1.1.2-3.pom https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.1.2-3/kotlin-gradle-plugin-1.1.2-3.jarrequired by: project :
这是我的build.gradle(Module):
apply plugin: 'com.androID.application'apply plugin: 'kotlin-androID'androID { compileSdkVersion 25 buildToolsversion "25.0.3" defaultConfig { applicationID "ir.baslam.kotlinme" minSdkVersion 16 targetSdkVersion 25 versionCode 1 versionname "1.0" testInstrumentationRunner "androID.support.test.runner.AndroIDJUnitRunner" } buildTypes { release { MinifyEnabled false proguardfiles getDefaultProguardfile('proguard-androID.txt'), 'proguard-rules.pro' } }}dependencIEs { compile filetree(dir: 'libs', include: ['*.jar']) androIDTestCompile('com.androID.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.androID.support', module: 'support-annotations' }) compile 'com.androID.support:appcompat-v7:25.3.1' compile 'com.androID.support.constraint:constraint-layout:1.0.2' testCompile 'junit:junit:4.12' compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"}repositorIEs { mavenCentral()}
这是我的build.gradle(project):
// top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { ext.kotlin_version = '1.1.2-3' repositorIEs { jcenter() } dependencIEs { classpath 'com.androID.tools.build:gradle:2.3.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 { jcenter() }}task clean(type: Delete) { delete rootProject.buildDir}
解决方法:
ext.kotlin_version = '1.1.2-3'
jcenter repo中不提供“ 1.1.2-3”版本,在您的文件系统中也不可用.
当我检查jcenter的最新版本1.1.2-2在2017年4月28日进行了最后更新时,请使用1.1.2-2版本而不是1.1.2-3.
ext.kotlin_version = '1.1.2-2'
总结 以上是内存溢出为你收集整理的Android Studio中的Kotlin全部内容,希望文章能够帮你解决Android Studio中的Kotlin所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)