Kotlin plugin in Android Studio 2.2 preview 1 not working


#1

When I try to run an APP in Android Studio 2.2 preview 1, such Exception would happen:

Plugin Error: Kotlin threw an uncaught NoSuchMethodError. Disable Plugin
NoSuchMethodError: org.jetbrains.android.facet.AndroidFacet.getProjectResources(Z)Lcom/android/tools/idea/rendering/ProjectResourceRepository;

Maybe you guys have to do something to make it work in AS with this version.

Thanks!


#2

I have same problem…
is it bug???


#4

yeah, I get this error, too


#5

Can confirm, plugin crashes, but gradle build also fails when using new android plugin (2.2.0-alpha1)


#6

FYI: build works if you apply Kotlin plugin first, and then Android plugin:

dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.android.tools.build:gradle:2.2.0-alpha1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

#7

but android-kotlin-extensions plugin was incorrect


#8

Yes that worked, but it also works the other way around if you downgrade to kotlin version 1.0.1-2