skip to Main Content

This is my first time posting a question on a forum because I’m facing an issue that I can’t resolve.

I’ve developed a mobile application using React Native with Expo to simplify the build and submission process to app stores. I have no problems on the Apple side. However, when building for Android, I receive an error message that didn’t appear earlier in the project.

The problem arose after adding a scheme for deep linking.

My dependencies are working together without issues. I have also executed the command npx expo prebuild beforehand to generate the android folder.

I have my eas.json file, and eas-cli is properly installed.

Here is my eas.json:

{
  "cli": {
    "version": ">= 7.5.0"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    },
    "preview": {
      "android": {
        "buildType": "apk"
      }
    },
    "production": {
      "env": {
        "EXPO_PUBLIC_XXXXXX_API_URL": "https://xxx",
        "EXPO_PUBLIC_XXXXXX_URL": "https://xxx",
        "EXPO_PUBLIC_XXXXXX_WEBSOCKET": "https://xxx",
        "EXPO_PUBLIC_XXXXXX_KEY": "xxx",
        "EXPO_PRIVATE_XXXXXX": "xxx",
        "EXPO_PUBLIC_PROJECT_ID": "xxx"
      }
    }
  },
  "submit": {
    "production": {}
  }
}

And my app.json:

{
  "expo": {
    "name": "AppName",
    "slug": "appname",
    "version": "1.0.0",
    "orientation": "portrait",
    "scheme": "appname",
    "platforms": ["android"],
    "android": {
      "package": "com.appname.app",
      "permissions": [
        "CAMERA",
        "INTERNET",
        "MODIFY_AUDIO_SETTINGS",
        "READ_EXTERNAL_STORAGE",
        "RECORD_AUDIO",
        "SYSTEM_ALERT_WINDOW",
        "VIBRATE",
        "WRITE_EXTERNAL_STORAGE"
      ],
      "manifestPlaceholders": {
        "appAuthRedirectScheme": "appname"
      }
    }
  }
}

Error Message when running eas build -p android --profile production:

Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for <appAuthRedirectScheme> is provided.

My AndroidManifest.xml is correctly configured.

  • Operating System: macOS

  • React Native Version: 0.74.6

What I’ve Tried:

Additional Information:

  • The issue started after adding the scheme for deep linking.

  • The build works fine for iOS but fails for Android with the above error.

  • I’ve ensured that eas-cli is installed and up to date.

  • I’ve executed npx expo prebuild to generate the android folder.

  • All dependencies seem to be working correctly.


Question:

How can I resolve the error related to the <appAuthRedirectScheme> placeholder in AndroidManifest.xml during the Android build with Expo?

Any help would be greatly appreciated. If you need more information, please let me know.

2

Answers


  1. Do small change in app/build.gradle file.

    android {
    compileSdkVersion 33
    buildToolsVersion '34.0.0'
    
    defaultConfig {
        applicationId "com.appname.app"
        ...
    
        // place correct redirectScheme~
        manifestPlaceholders = [appAuthRedirectScheme: 'com.redirectScheme.comm']
    
    }
    
    Login or Signup to reply.
  2. I am also having the same issues even though I already included

    manifestPlaceholders = [appAuthRedirectScheme: ‘com.redirectScheme.comm’]

    in my android/app/build.gradle

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search