3rd-party Gradle插件可能是原因 [英] 3rd-party Gradle plug-ins may be the cause
问题描述
更新到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'
}
}
}
推荐答案
要解决此问题,请从运行配置中删除 即时应用设置
,仅保留 Gradle-Aware进行
。
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
.
这篇关于3rd-party Gradle插件可能是原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!