我在创建项目时遇到错误。
' android.enableAapt2' 这个选项已被弃用,不应该是 已经用完了。使用' android.enableAapt2 = true'删除此警告。 它将在2018年底删除
Android Studio版本:3.1.1
请帮忙。
提前致谢。
App Gridle
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.sample.melimu.myapplication3"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'}
构建应用程序的结果:
构建失败4s 807ms
运行build 4s 585ms
加载构建9ms
配置构建811ms
计算任务图132ms
运行任务3s 609ms
空
java.util.NoSuchElementException
无法执行aapt
grade.project
gradle.properties:
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true