As the title states, I'm having quite of a frustrating time trying to solve this. It seems like it could be a silly mistake that I have overlooked. The issue here is that I want to include the new Android Architecture Component ViewModel into my project structured as an Instant App. I have followed this guideline to add it as a dependency in build.gradle.
As the documentation states,
For LiveData, and ViewModel, add: implementation "android.arch.lifecycle:extensions:1.0.0"
Now in my AndroidStudio-generated Instant App project structure, I want to make this dependency available to all feature modules. So, I add the above line to my base
module, but use the api
keyword instead, in order for feature modules to be able to reference it like below
In base module's build.gradle:
api 'android.arch.lifecycle:extensions:1.0.0'
When I now go and add applicationIdSuffix ".dev"
to my buildType in build.gradle in the base module, or even change the default applicationId, Android Studio suddenly does not recognize my Default Activity when attempting to run. I have double checked the default activity declaration in my AndroidManifest.xml multiple times, so it is definitely not that issue.
If I remove that dependency from build.gradle, the issue disappears completely and the Default Activity is recognized. This is really weird and would like to know if anyone experiences any issues similar to this.
Note: The Default Activity is declared in a feature module's AndroidManifest.xml