Nestor February 2016
Flavored Activity can't be found on launch
I have created 2 flavors in Android Studio's Gradle, and I put the MainActivity file in their respective folder structures.
This is how the project looks:
This is the Gradle flavor part:
Unfortunately, when I use the full flavor, the MainActivity is considered unset.
The project can be compiled in both flavors, it just can't be run on full flavor as it can't find the Default Activity.
The two files have minimal differences.
What should I check?
keith February 2016
Perhaps not directly addressing your issue, but have you considered making a pure Java helper class that provides different functionality to your MainActivity?
The problem here appears to be your moving MainActivity is not being recognized by the AndroidManifest when in full mode, but if you have 2 versions of your helper class everything should be good
If you want to specify two different activities, use a relative path in your AndroidManifest.
Be cautious to try and reuse as much common code as possible between your two activities to save yourself any headaches down the road though
Asked in February 2016
Viewed 1,626 times
Answered 1 times
Leave an answer
Quote of the day: live life