Android build error "AndroidManifest.xml requires a placeholder substitution"

Viewed 23850

I'm building a reactNative app for Android, and I'm getting this error:

Manifest merger failed : Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for is provided.

What is this error? how to solve it? Cheers

4 Answers

in the

app build.gradle

android {
compileSdkVersion 26
buildToolsVersion '26.0.3'

defaultConfig {
    applicationId "com.chuchas.comm"
    ...

    // place correct redirectScheme~
    manifestPlaceholders = [appAuthRedirectScheme: 'com.redirectScheme.comm']

}

In the app build.gradle, navigate to the defaultConfig section and add the following line.

Source Code

   defaultConfig {
    ...
    manifestPlaceholders = [appAuthRedirectScheme: 'com.redirectScheme.comm']
}

I hade placed my api key in Gradle Script directory local.properties file and received the same error when I used the key in Manifest meta-data tag. The following solved it:
In build.gradle Project file add:

id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' version '2.0.0' apply false

In build.gradle Module file add:

id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
Related