27

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

manuelBetancurt
  • 15,428
  • 33
  • 118
  • 216

4 Answers4

39

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']

}
manuelBetancurt
  • 15,428
  • 33
  • 118
  • 216
11

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

Source Code

   defaultConfig {
    ...
    manifestPlaceholders = [appAuthRedirectScheme: 'com.redirectScheme.comm']
}
Ishara Amarasekera
  • 1,387
  • 1
  • 20
  • 34
Bello Damilola
  • 311
  • 3
  • 5
6

Try to add manifestPlaceholders

https://github.com/FormidableLabs/react-native-app-auth#add-redirect-scheme-manifest-placeholder

android {
  defaultConfig {
    manifestPlaceholders = [
      appAuthRedirectScheme: 'io.identityserver.demo'
    ]
  }
}
Hadnazzar
  • 1,517
  • 19
  • 21
1

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'
Hmerman6006
  • 1,622
  • 1
  • 20
  • 45