I'm using productFlavors and attempting to change the packageName depending on the flavor:
productFlavors {
flavor1 {
packageName "com.mypackagename.one"
}
flavor2 {
packageName "com.mypackagename.two"
}
}
This was working fine until I updated to Gradle 0.14.4, now it fails with the following message:
Error:(21, 0) Gradle DSL method not found: 'packageName()'
Possible causes:
The project 'MyProject' may be using a version of Gradle that does not contain the method.
<a href="open.wrapper.file">Open Gradle wrapper file</a>
The build file may be missing a Gradle plugin.
<a href="apply.gradle.plugin">Apply Gradle plugin</a>
How can I resolve this issue, whilst retaining the ability to change the packageNames for my flavors?
If this is simply because the method name has changed, where do I go to find out about these changes? I can't seem to find the associated changelog, or an updated doc explaining how to do this.
How can I resolve this issue, whilst retaining the ability to change the packageNames for my flavors?
Change them to applicationId
:
productFlavors {
flavor1 {
applicationId "com.mypackagename.one"
}
flavor2 {
applicationId "com.mypackagename.two"
}
}
where do I go to find out about these changes?
At the moment, go to the documentation on the tools site.
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