Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

kotlin-android error when using Android Studio 3.2 Canary 17

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

like image 681
John O'Reilly Avatar asked Jun 07 '18 20:06

John O'Reilly


1 Answers

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.

like image 99
cesards Avatar answered Sep 22 '22 15:09

cesards