I am trying to add kotlin to my project, but after i add kotlin-android plugin to build.gradle - assemble fails first time, if i clean project before.
./gradlew clean && ./gradlew assembleDebug
error: cannot access DrawerLayoutImpl
BUILD FAILED
Second time it builds successfully
./gradlew assembleDebug
BUILD SUCCESSFUL
So i try to add the kotlin plugin to android NavigationDrawer sample from googlesamples and see the same behavior.
I fork the sample and try next scenario:
git clone https://github.com/rusmonster/android-NavigationDrawer.git
cd android-NavigationDrawer
./gradlew clean && ./gradlew assembleDebug
BUILD SUCCESSFUL
git checkout add-kotlin-plugin
git diff master
diff --git a/Application/build.gradle b/Application/build.gradle
index 48783bd…1e54a8c 100644
— a/Application/build.gradle
+++ b/Application/build.gradle
@@ -5,10 +5,12 @@ buildscript {
dependencies {
classpath ‘com.android.tools.build:gradle:1.0.0’
-
} classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:0.11.91.1"
}
apply plugin: ‘com.android.application’
+apply plugin: ‘kotlin-android’
repositories {
jcenter()
./gradlew clean && ./gradlew assembleDebug
/NavigationDrawerActivity.java:89: error: cannot access DrawerLayoutImpl
BUILD FAILED
./gradlew assembleDebug
BUILD SUCCESSFUL
./gradlew clean && ./gradlew assembleDebug
/NavigationDrawerActivity.java:89: error: cannot access DrawerLayoutImpl
BUILD FAILED