简体   繁体   中英

Flutter Plugin manifestPlaceholders error

I'm trying to create a plugin for flutter. My problem is that looks like flutter is not recognizing manifestPlaceholders for some reason (probably me doing something wrong).

So I added this lines to my android/build.gradle file.

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
}

But when I try to compile the app I get the following errors:

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.

I really don't know what I'm missing here. Your help will be much appreciated.

Regards

The placeholder needs to be added to the app 's build.grade . In a plugin, that means the example app's - plugin_project/example/android/app/build.grade .

That also means that you should add something to your plugin's readme. Users of your plugin will need to add it to their app project's build.grade . In an app project, that's app_project/android/app/build.grade .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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