【问题标题】:Android build error "AndroidManifest.xml requires a placeholder substitution"Android 构建错误“AndroidManifest.xml 需要占位符替换”
【发布时间】:2019-02-10 03:48:35
【问题描述】:

我正在为 Android 构建一个 reactNative 应用程序,但出现此错误:

清单合并失败:AndroidManifest.xml 中的属性 data@scheme 需要占位符替换,但未提供值。

这是什么错误?如何解决? 干杯

【问题讨论】:

标签: android react-native


【解决方案1】:

应用构建.gradle

android {
compileSdkVersion 26
buildToolsVersion '26.0.3'

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

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

}

【讨论】:

  • 先生,您是否在将上述问题放入 build.gradle 文件后解决了上述问题?
  • 我是新手。如何在应用程序中找到 appAuthRedirectScheme?
【解决方案2】:

在应用程序build.gradle 中,导航到defaultConfig 部分并添加以下行。

源代码

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

【讨论】:

    【解决方案3】:

    尝试添加 manifestPlaceholders

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

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

    【讨论】:

      猜你喜欢
      • 2016-09-18
      • 1970-01-01
      • 2023-02-04
      • 2017-12-18
      • 2021-06-25
      • 2013-04-08
      • 2017-09-11
      • 2013-01-24
      • 1970-01-01
      相关资源
      最近更新 更多