簡體   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