When i try to add kotlin-android-extensions via:
apply plugin: 'kotlin-android-extensions'
to my project Android Studio tells me Plugin with 'kotlin-android-extensions not found??
What is going wrong? I am Running Android Studio 3.0 Canary 8
They are not supported with Java. There are still projects that are written in Java and may not be fully migrated to Kotlin yet, and hence Kotlin Synthetics may not be a consistent way of getting the ViewIds in your project. Because of these issues, Kotlin Synthetics is now being deprecated.
I think it's all about ordering, make sure you have plugin orders like that
apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'realm-android'
Android Studio 4.1
plugins { id 'com.android.application' id 'kotlin-android' id 'kotlin-android-extensions' }
I think it's all about ordering, make sure you have plugin orders like that
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'realm-android'
Please also consider that you must be careful about apply plugin:
orders:
So in order to apply kotlin-android-extensions
you must first apply kotlin-android
. Same as the following coode:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With