Why “This app has been built with an incorrect configuration” error occured in some phones?

This worked well for me

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
    applicationId "com.example.app"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    generatedDensities = []
}

// This is handled for you by the 2.0+ Gradle Plugin
aaptOptions {
    additionalParameters "--no-version-vectors"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}

Notice this in the above code:

// This is handled for you by the 2.0+ Gradle Plugin
aaptOptions {
    additionalParameters "--no-version-vectors"
}

and

generatedDensities = []

UPDATE

If this generatedDensities = [] is showing deprecated, use the following instead.

vectorDrawables.generatedDensities = []

Hope it helps

Leave a Comment