I'm creating an instant version of my Android game. I have followed the instructions on this example:
The problem is that in the feature module I need to access services implemented by the com.google.gms.google-services plugin, so I put it at the bottom of my dependencies in the gradle file for such module, but as the package name of my game is (say) com.me.mygame while the one for the feature module would be com.me.mygame.base, the aforementioned plugin fails because there's no com.me.mygame.base package defined in my app google-services.json file.
So I tried by setting the name of the feature module to com.me.mygame too and that made the trick for that and gradle would successfully build the project, but it will fail when trying to build the APKs due
com.android.dex.DexException: Multiple dex files define Lcom/me/mygame/BuildConfig
I tried to workaround this by adding this option to my gradle modules, as suggested in an answer to a related question here:
android {
dexOptions {
preDexLibraries = false
}
}
But to no avail. The problem persist.
It seems the logical thing would be that the feature module has a different package name, but as told before this will fail due the com.google.gms.google-services plugin not founding a configuration for such package.
So... I'm stuck at this and have run out of ideas, so any help will be welcomed.
Thanks a million in advance!
UPDATE: I have published a minimal example in github at the following URL:
https://github.com/fmmarzoa/IssuesWithFirebaseCrashlytics
I've took that example directly from Google Guides. The master branch is empty, those with the workarounds I've tried so far are all named 'firebase/...'. The last one is this 'firebase/updating-plugins':
https://github.com/fmmarzoa/IssuesWithFirebaseCrashlytics/tree/firebase/updating-plugins
What I have done in that one is to update several things as suggested by dchai, and it seems to do the trick for the Google Services plugin (at least it does build now) but the Firebase Crashlytics plugin which depends on the aforementioned one continues failing with the error message:
Crashlytics could not find the manifest. Not found at /Users/fran/Desktop/Idea/android-topeka/base/build/intermediates/merged_manifests/debug/AndroidManifest.xml