Appauth-android: Error: Manifest merger failed

Created on 28 Nov 2016  Â·  15Comments  Â·  Source: openid/AppAuth-Android

I got an error

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for <appAuthRedirectScheme> is provided.

How to solve this?

Most helpful comment

Hi ,

You need to mention your App Auth Redirect Scheme in App's build.gradle file. Below is example from my code.

android.defaultConfig.manifestPlaceholders = ['appAuthRedirectScheme': 'YOURSCHEME']

YOUR SCHEME is same value as in Manifest file RedirectUriReceiverActivity.








All 15 comments

Hi ,

You need to mention your App Auth Redirect Scheme in App's build.gradle file. Below is example from my code.

android.defaultConfig.manifestPlaceholders = ['appAuthRedirectScheme': 'YOURSCHEME']

YOUR SCHEME is same value as in Manifest file RedirectUriReceiverActivity.








Closing due to lack of activity.

I fixed it by recursively downloading AppAuth instead of downloading the zip file. I'm boosted af.

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

android {
  defaultConfig {
      manifestPlaceholders = [
        appAuthRedirectScheme: 'io.identityserver.demo'
      ]
    }
  }

Thanks for the hint on Gradle Manifest Placeholders.

@hadnazzar: sir i have tried but not worked for me got below error in ionic3-
Attribute meta-data#com.google.android.geo.API_KEY@value at AndroidManifest.xml:53:66-112 requires a placeholder substitution but no value for is provided.

sir please tell me how to fix above issue i stuck this issue last 1 days?

@kapilSoni101 did you change GOOGLE_MAPS_ANDROID_API_KEY as yours?

@hadnazzar: yes sir i have put key in the AndroidManifest.xml file but after build android our changes are override to new change tell me why override?

sir but after build android its look link this and create 2 file for that:

> 
   <meta-data android:name="com.google.android.geo.API_KEY" android:value="AIzaSyDr9bFUI2dH0j_jSvyrrx222waiTAr74Uo" />
        <meta-data android:name="com.google.android.geo.API_KEY" android:value="${GOOGLE_MAPS_ANDROID_API_KEY}" />

I have the same error in my app, I already have

manifestPlaceholders = [
        'appAuthRedirectScheme': 'my.scheme'
    ] in my app. 

However, I'm still getting this error.

Do you have multiple modules? We for example have a module for authorization. In its gradle script we have a fake scheme....
In the app gradle script we have the correct scheme that is used in the end.

FÃ¥ Outlook til Androidhttps://aka.ms/ghei36


From: Iryna Kreichmann notifications@github.com
Sent: Tuesday, July 23, 2019 3:43:00 PM
To: openid/AppAuth-Android
Cc: Subscribed
Subject: Re: [openid/AppAuth-Android] Error: Manifest merger failed (#128)

I have the same error in my app, I already have

manifestPlaceholders = [
'appAuthRedirectScheme': 'my.schemet'
] in my app.

However, I'm still getting this error.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/openid/AppAuth-Android/issues/128?email_source=notifications&email_token=AJT4PXI3BKXPKJ5O5HUYPTTQA4DGJA5CNFSM4CXVSFM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2TE5GQ#issuecomment-514215578, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJT4PXOO6YHVBMU2RLEOYZLQA4DGJANCNFSM4CXVSFMQ.

As a workaround you can add
manifestPlaceholders = [appAuthRedirectScheme: 'com.redirectScheme.comm'] to defailt config {} in /android/app/buid.gradle

Is it possible to specify placeholders from the code? I need to make the possibility to update the config information from backend.

Using android.defaultConfig.manifestPlaceholders = ['appAuthRedirectScheme': 'YOURSCHEME'] could be an important information for the README - what do you think?

@luckyhandler I have puted android.defaultConfig.manifestPlaceholders = ['appAuthRedirectScheme': 'YOURSCHEME'] in build.gradle I got the following
Could not get unknown property 'android' for root project

@ramisalem Did you put it in the app build.gradle or project build.gradle?

You should have it in the app build.gradle. It should look something like this:

android {
        manifestPlaceholders = [
                appAuthRedirectScheme: "com.example.project"
        ]
        buildConfigField "String", "ssoRedirScheme", "\"com.example.project://oauth/redirect\""
Was this page helpful?
0 / 5 - 0 ratings