Reputation: 3627
I currenly have a project system in Android Studio where I have many apps that share the same project structure and code.
Since I was unsuccessful in getting flavours fully working (other SO question), I have opted for the following system.
Whenever I need to change to on of my other apps i:
This actually works and only takes two minutes. However, when I am deploying my apps (in debug mode at least) and one of the other is already installed, I get INSTALL_FAILED_CONFLICTING_PROVIDER error message.
Now, this can of course be solved by deleting the old app, but I would like to have all my apps installed at the same time.
What i do not quite understand is that each app is compiled with its own manifest file where provider is defined like this:
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.example-app-flavour-1.app.fileprovider"
android:grantUriPermissions="true"
android:exported="false">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_filepaths" />
</provider>
i.e. each app is compiled with unique authorities
I have tried to
What am i missing here?
(Naurally I would like to get Android Studio gradle flavours to work some day, but for now I am switching my focus to this since it so close working perfectly with minimal trouble each time I need to switch app)
Upvotes: 1
Views: 445
Reputation: 3627
The gradle also needs to contain this
defaultConfig {
applicationId "com.example.app"
}
I had left it out completely
Upvotes: 1