【发布时间】:2016-11-07 15:04:27
【问题描述】:
我有问题。我有一个旧项目,用 kotlin 写的。它是 1.0.2 版本,但我有一个编译器扩展。
java.lang.ClassNotFoundException: com.intellij.util.containers.EmptyIterator
而且是 build.gradle 应用文件:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'io.fabric'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "eu.***.**.**"
minSdkVersion 16
targetSdkVersion 23
versionCode 7
versionName "1.0.13"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' }
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile('com.thoughtworks.xstream:xstream:1.4.7') {
exclude group: 'xmlpull'
}
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
testCompile 'junit:junit:4.12'
testCompile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testCompile 'org.powermock:powermock-module-junit4:1.6.4'
testCompile 'org.powermock:powermock-api-mockito:1.6.4'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.j256.ormlite:ormlite-android:4.+'
compile 'com.github.buchandersenn:android-permission-manager:1.0.0'
compile 'com.squareup.retrofit2:retrofit:2.0.0'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.android.gms:play-services-maps:9.0.0'
compile 'com.commonsware.cwac:cam2:0.5.6'
compile 'com.github.bumptech.glide:glide:3.7.0'
}
buildscript {
ext.kotlin_version = '1.0.2'
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'io.fabric.tools:gradle:1.+'
}
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
}
如果我添加 1.0.4 版本的 kotlin,我会得到: 未解决的参考:brickred 导入 org.brickred.socialauth.android.SocialAuthAdapter
我必须修改这个应用程序,但我无法编译它。我花了 2 天时间进行编译,所以我需要帮助。谢谢你的帮助。
【问题讨论】:
-
缩进搞砸了。请让代码可读。