【问题标题】:Flutter Plugin manifestPlaceholders errorFlutter Plugin manifestPlaceholders 错误
【发布时间】:2019-10-01 15:13:04
【问题描述】:

我正在尝试为颤振创建一个插件。我的问题是,由于某种原因,flutter 似乎无法识别 manifestPlaceholders(可能是我做错了什么)。

所以我将此行添加到我的android/build.gradle 文件中。

android {
    compileSdkVersion 28

    defaultConfig {
        minSdkVersion 16
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        manifestPlaceholders = [auth0Domain: "example.auth0.com", auth0Scheme: "demo"] // this one for the manifestPlaceholders replacement.
    }
    ...
}
dependencies {
    implementation 'com.auth0.android:auth0:1.+' // this line to install auth0 dependency
}

但是当我尝试编译应用程序时,我收到以下错误:

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

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

我真的不知道我在这里错过了什么。非常感谢您的帮助。

问候

【问题讨论】:

  • 尝试将其添加到example/android/app/build.gradle
  • 很高兴听到这个消息。由于 cmets 可以擦除,所以我为后代添加了答案。

标签: android gradle flutter flutter-dependencies flutter-plugin


【解决方案1】:

占位符需要添加到应用build.grade。在插件中,这意味着示例应用的 - plugin_project/example/android/app/build.grade

这也意味着您应该在插件的自述文件中添加一些内容。您插件的用户需要将其添加到他们的应用项目的build.grade。在应用项目中,即app_project/android/app/build.grade

【讨论】:

    猜你喜欢
    • 2020-04-10
    • 1970-01-01
    • 1970-01-01
    • 2022-12-16
    • 1970-01-01
    • 2022-10-04
    • 1970-01-01
    • 2021-03-30
    • 2011-11-12
    相关资源
    最近更新 更多