Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run application on android with custom flavour #11785

Closed
jr-k opened this issue Jan 9, 2017 · 2 comments
Closed

Run application on android with custom flavour #11785

jr-k opened this issue Jan 9, 2017 · 2 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@jr-k
Copy link
Contributor

jr-k commented Jan 9, 2017

Hello,

I'm trying to use productFlavours on my app. Here is my build.gradle

 productFlavors {
        free {
            applicationId "com.myapp"
        }
        pro{
            applicationId "com.myapp.pro"
        }
    }

My application is working fine with the original applicationId/packageName which is com.myapp

When I run my app with variant "pro" I see my custom SplashScreenActivity then, when it comes to MainActivity it crashes: http://puu.sh/tgssh/4dce437439.png

FYI here is my SplashScreenActivity bootstraping my app just in case: http://puu.sh/tgsvm/ccedc60af6.png

Any idea ? Thanks for your help !

@dkpalmer
Copy link

I ran into the same "Could not get BatchedBridge" error with different build types instead of product flavors, but I suspect it's the same issue. In your build.gradle file, you can try added a project.ext.react section (see comment block at top of the file).

For me, I have three variants (debug, beta, release) with corresponding packages similar to com.myapp.debug, com.myapp.beta, and com.myapp. I had to add a project.ext.react block to allow connection to packager in debug and to bundle my app for beta and release:

project.ext.react = [
  bundleInDebug: false,
  bundleInBeta: true,
  bundleInRelease: true,
]

Also worth noting I had issues getting project.ext.react settings picked up the first time. See #12135.

@hramos
Copy link
Contributor

hramos commented Jul 20, 2017

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

@hramos hramos added the Icebox label Jul 20, 2017
@hramos hramos closed this as completed Jul 20, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Jul 20, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants