I am trying to perform a substitution in the AndroidManifest.xml file from the build.gradle android extension, but I get this error:
AndroidManifest.xml:89:16 Error: Attribute uses-library
This is a snippet of the manifest file:
... </receiver> <uses-library android:name="com.company.platform.${encoding}" /> </application> ...
And this is disabled by build.gradle:
android { compileSdkVersion 23 buildToolsVersion "23.0.1" defaultConfig { applicationId "com.company.app" minSdkVersion 23 targetSdkVersion 23 versionName cityVersion setProperty("archivesBaseName", "City_$versionName") manifestPlaceholders = [encoding: "some value"] manifestPlaceholders = [version: cityVersion] }
I also tried adding manifestPlaceholders to buildTypes ie
buildTypes { release { minifyEnabled true shrinkResources true manifestPlaceholders = [encoding: deviceEncoding] manifestPlaceholders = [version: cityIDVersion] } debug { manifestPlaceholders = [encoding: deviceEncoding] manifestPlaceholders = [version: cityIDVersion] }
}
But I still get the same error.
Why is there an error about this that requires replacing a replacement when it is provided in manifest plugins?
source share