Allow product flavors #84

Open
opened 2025-08-09 17:13:18 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @Pedroalexandrelopes on 10/10/2019

Hi. I have an AndroidStudio project with product flavors defined in the gradle file for staging and production environments. Each flavor defines its own applicationId.

I have the args defined with 'assembleStagingDebug' in tasks.json so it can gradlew with the selected flavor profile.

When the debugger is trying to launch the MainActivity, it uses the defaultConfig applicationId/packageName to search for it.
It ends with the error "Launch failed: Error: Activity class {(packageName)/(MainActivity)} does not exist."

I can see the source code uses the command to launch activity 'am start' with the 'this.session.build.pkgname'.
Is it possible to have a launch configuration to specify the pkgname or any other way of searching the correct package of the flavor used?

*Originally created by @Pedroalexandrelopes on 10/10/2019* Hi. I have an AndroidStudio project with product flavors defined in the gradle file for staging and production environments. Each flavor defines its own applicationId. I have the args defined with 'assembleStagingDebug' in `tasks.json` so it can `gradlew` with the selected flavor profile. When the debugger is trying to launch the MainActivity, it uses the defaultConfig applicationId/packageName to search for it. It ends with the error _"Launch failed: Error: Activity class {(packageName)/(MainActivity)} does not exist."_ I can see the source code uses the command to launch activity `'am start'` with the `'this.session.build.pkgname'`. Is it possible to have a launch configuration to specify the pkgname or any other way of searching the correct package of the flavor used?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/android-dev-ext#84
No description provided.