3rd-party Gradle plug-ins may be the cause

humazed picture humazed · Mar 27, 2018 · Viewed 35k times · Source

After updating to Android Studio 3.1 I got this error message:

The project works fine and this is mostly just a warning, so my question is what's the meaning of the warning and how can I get rid of it?

The relevant parts from gradle files:

This is my project's build.gradle

buildscript {
    ext {
        kotlin_version = '1.2.31'
        anko_version = '0.10.4'
        room_version = '1.0.0'
        support_version = '27.1.0'
        firebase_version = '12.0.0'
        gms_version = '12.0.0'
    }

    repositories {
        google()
        jcenter()
        maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
        maven { url "https://jitpack.io" }
        maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
    }
}

And this is my app's build.gradle file:

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {
    compileSdkVersion 27
    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

Answer

Angel Kjoseski picture Angel Kjoseski · Mar 28, 2018

To solve the issue, remove Instant App Provision from the "Run Configurations" and leave only the Gradle-Aware Make.

Run -> Edit Configurations..

My Run/Debug configurations after successful build

I have AndroidStudio 3.1, Gradle Plugin 3.1.0 and Kotlin library version 1.2.30.