第 3 方 Gradle 插件可能是原因 [英] 3rd-party Gradle plug-ins may be the cause

查看:37
本文介绍了第 3 方 Gradle 插件可能是原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新到 Android Studio 3.1 后,我收到此错误消息:

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?

gradle 文件中的相关部分:

The relevant parts from gradle files:

这是我项目的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' }
    }
}

这是我的应用程序的 build.gradle 文件:

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'
        }
    }
}

推荐答案

要解决此问题,请从运行配置"中删除 Instant App Provision 并仅保留Gradle-Aware Make.

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

Run -> Edit Configurations..

我有 AndroidStudio 3.1、Gradle 插件 3.1.0 和 Kotlin 库版本 1.2.30.

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

这篇关于第 3 方 Gradle 插件可能是原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆