Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix AAPT2 warning [The following project options are deprecated and have been removed: android.enableAapt2] in Android Studio 3.3

When I build my App. I got Warning, after update Android Studio version to 3.3 and update gadler plugin etc.

enter image description here

this is my build.gradle(Module:App)

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.jirin.kollinapp"
    minSdkVersion 19
    targetSdkVersion 28
    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(include: ['*.jar'], dir: 'libs')
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
}

gradle.properties

org.gradle.jvmargs=-Xmx1536m
android.enableAapt2=false
like image 249
sirinan jirinsa Avatar asked Jan 15 '19 07:01

sirinan jirinsa


1 Answers

Seems like AAPT2 is enabled by default with Gradle 3+.

Make sure to update to Gradle 3.3.0. Then do a clean.

The warning just tells you to remove android.enableAapt2=false from gradle.properties.

like image 73
shkschneider Avatar answered Nov 08 '22 21:11

shkschneider