繁体   English   中英

Flutter插件manifestPlaceholders错误

[英]Flutter Plugin manifestPlaceholders error

我正在尝试为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.

我真的不知道我在这里想念什么。 您的帮助将不胜感激。

问候

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM