I'm currently working to migrate our app from ant to gradle and managed to have everything working. Now I would like to use flavors with different packageName to be able to install our Production app alongside the development one. This is the flavors I made:
productFlavors {
playstore {
packageName='com.my.app'
buildConfig "-- a bunch of build flags for ps --"
}
beta {
packageName='com.my.beta.app'
buildConfig "-- a bunch of build flags for beta --"
}
dev {
packageName='com.my.dev.app'
buildConfig "-- a bunch of build flags for dev --"
}
}
My problem is, we use some custom attributes for our custom view and I get the error:
Gradle: No resource identifier found for attribute
when I try to build with these flavors. I used:
xmlns:app="http://schemas.android.com/apk/res/com.my.app"
to import our custom attributes, I tried with res-auto but it seems to rewrite my xml with the base package name so this does not solve anything. I was wondering if somebody already ran into this problem and if there is a way to make this work.
Thanks for your time,
Martin
Ok seems like the
xmlns:app="http://schemas.android.com/apk/res-auto"
work indeed but clicking the error in android studio opened the generated xml instead of the source one...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With