当前位置: 动力学知识库 > 问答 > 编程问答 >

android - Kotlin extension bugs

问题描述:

i have a problem. I got an old project, what wrote in kotlin.It is 1.0.2 version but i got a compiler extension.

java.lang.ClassNotFoundException: com.intellij.util.containers.EmptyIterator

And it is the build.gradle app file:

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:[email protected]') {

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" }

}

If I add 1.0.4 version of kotlin i got this :

Unresolved reference: brickred

import org.brickred.socialauth.android.SocialAuthAdapter

I have to modify this app, but i can't compile it.I spend 2 days for compile , so I need help. Thank you for help.

网友答案:

I think plugin 'kotlin-android-extensions' has been discontinued or something.

Please align your build.gradle with https://kotlinlang.org/docs/reference/using-gradle.html

分享给朋友:
您可能感兴趣的文章:
随机阅读: