Reputation: 3348
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
Upvotes: 1
Views: 1588
Reputation: 51692
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
.
Upvotes: 2