6
votes

Just updated to Android Studio 3.2 Canary 17 and now getting following error:

A problem occurred configuring project ':some_module`. 'kotlin-android' expects one of the Android Gradle plugins to be applied to the project:

    * android
    * com.android.application
    * android-library
    * com.android.library
    * com.android.test
    * com.android.feature
    * com.android.dynamic-feature

The build.gradle for that module includes:

apply plugin: 'com.android.feature'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

The project includes several modules composed of mixture of com.android.application, com.android.feature, and com.android.instantapp

2
Yep, it's probably a bad build, and they are aware of it: issuetracker.google.com/issues/109893035 - TWL
Thanks @TWL, I see following comment earlier in related issue so hopefully there'll be build available soon with this fixed. "We are going to revert the change and release a new build." - John O'Reilly
Last update short while ago in issuetracker.google.com/issues/109894102 in response to question on timing of release with fix: "As soon as we can but probably a few days at least unfortunately." - John O'Reilly
I have the exact same issue - Ken Zira

2 Answers

2
votes

I think the error comes from your instant app module. It's happening the same to me for dynamic feature modules. I opened an issue here.

If you have a look to your log, it's only affecting to instant / dynamic feature modules:

Caused by: org.gradle.api.plugins.InvalidPluginException: 'kotlin-android' expects one of the Android Gradle plugins to be applied to the project: * android * com.android.application * android-library * com.android.library * com.android.test * com.android.feature * com.android.dynamic-feature <-------

and from your log:

* android * com.android.application * android-library * com.android.library * com.android.test * com.android.feature * com.android.dynamic-feature <-----

I guess they will be fixing it soon :-) Since it's kind of a big deal, he.

0
votes

Fixed in Canary 18 which is out now.