I have set up Gradle to add package name suffix to my debug app so I could have release version that I\'m using and debug version on one phone. I was referencing this: http:
Unfortunately, the current version (0.4.1) of the android plugin doesn't seem to provide a good solution for this. I haven't had time to try this yet, but a possible workaround for this problem would be to use a string resource @string/provider_authority
, and use that in the manifest: android:authority="@string/provider_authority"
. You then have a res/values/provider.xml
in the res folder of each build type that should override the authority, in your case this would be src/debug/res
I've looked into generating the xml file on the fly, but again, there doesn't seem to be any good hooks for it in the current version of the plugin. I'd recommend putting in a feature request though, I can imagine more people will run into this same issue.