Uh oh!
There was an error while loading. Please reload this page.
Fixed the run-android cli script to start the correct activity when using different applicationId for different variants - #8950
Conversation
ghost
commented
Jul 21, 2016
By analyzing the blame information on this pull request, we identified @burgalon and @jimthedev to be potential reviewers. |
From the issue:
What's the reason to change only one and not the other? Do you have an example when you'd do that? This PR contains a lot of code, is there a way to solve this say with a few lines of code? One thing not clear from the description of this PR: what's the new |
tume
commented
Aug 2, 2016
Sorry if i'm discussing in wrong place but I also had problems with applicationId as described and this pull request came closest when searching. Our case is that we have same application built for different environments (dev/qa/prod) and we need to install those side-by-side so that is the reason for different applicationIds. If I have understood correctly the applicationId should be decoupled from the Androidmanifest.xml package_name exactly for this kind of purpose. See more: http://tools.android.com/tech-docs/new-build-system/applicationid-vs-packagename Not experienced enough on Android build systems to comment on actual implementation but would think that simpler option would be just to read straight the applicationId from build.gradle if there is no other problems with it. |
ghost
commented
Aug 20, 2016
@kgritesh updated the pull request - view changes |
There was a problem hiding this comment.
Since we are already in the android directory: https://github.com/facebook/react-native/pull/8950/files#diff-a003f89d34db18b4567fdb55080a003eR81
I believe these two file paths should be app/build.gradle and app/build/intermediates/manifests/full
There was a problem hiding this comment.
@enterline yes you are right these two paths should be app/build.gradle and app/build/intermediates/manifests/full . I have updated my PR accordingly.
facebook-github-bot
commented
Aug 23, 2016
@kgritesh updated the pull request - view changes |
ghost
commented
Aug 23, 2016
@kgritesh updated the pull request - view changes |
818a297 to
cc67004Compareghost
commented
Sep 20, 2016
@kgritesh updated the pull request - view changes |
kgritesh
commented
Sep 20, 2016
@mkonicek sorry for missing your comments earlier. As per your other comment about that this pr contains lot of code, i don't think there is a simpler and cleaner way to solve this for all kind of corner cases Finally the --activity options allows you to pass name of your launch activity incase its not called MainActivity. Most common use case is when you are adding react native to an existing app and the default launch activity is named something else |
cc67004 to
9068ddfCompareghost
commented
Sep 20, 2016
@kgritesh updated the pull request - view changes |
StevePotter
commented
Oct 17, 2016
💯 . This fixed my problem. Our build.gradle looks like: And so on. This PR fixes it perfectly. I worked like mad on #10178 and it just got merged. So should this one. The build scripts in react-native are weak and people like @kgritesh are improving it. Let's get this merged because right now I have to patch it. Thanks @kgritesh for your hard work! |
kgritesh
commented
Oct 18, 2016
thanks @StevePotter for your kind words. I am also waiting for this to get merged. |
facebook-github-bot
commented
Oct 18, 2016
@kgritesh updated the pull request - view changes |
VictoriaQ
commented
Oct 28, 2016
This fixed our issues, thanks! Note that (at least in Linux), if you run it with Running the task with the variant name in lowercase I think that |
hramos
commented
Nov 11, 2016
@mkonicek thoughts on this PR? |
using different applicationId for different variants
53c4f9c to
1350b35Comparechetstone
commented
Dec 12, 2016
@mkonicek Any progress on merging this PR? |
fkrauthan
commented
Jan 12, 2017
Yeah what is going on? This merge request is super old. I already opened a bug about exactly this but it seems like no love for Android in react native :( |
hramos
commented
Jan 19, 2017
Thanks for the PR. I'd like to push for solving this issue with fewer lines of code as well. |
kgritesh
commented
Jan 20, 2017
via email
Hey Hector,
I will submit a new PR by end of this week making this better works? …On Fri, Jan 20, 2017 at 2:46 AM, Héctor Ramos ***@***.***> wrote:
Thanks for the PR. I'd like to push for solving this issue with fewer
lines of code as well.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8950 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADLpr1wgBLx-plIEyVrZYJ5AjDEgJNAZks5rT9KUgaJpZM4JSGM1>
.
|
hramos
commented
Jan 20, 2017
Does it need to be a new PR or can you land the commits on this one? |
vongohren
commented
Feb 1, 2017
Hows the work with this going? |
vongohren
commented
Feb 20, 2017
Is this getting anywhere? @kgritesh? Can this be solved with any other solution? @hramos@mkonicek |
hramos
commented
Feb 22, 2017
kgritesh
commented
Feb 22, 2017
via email
Sorry guys for not responding. I will surely try to refix this over next
week and send another PR for latest version of react native. …On Thu, Feb 23, 2017 at 1:02 AM, Héctor Ramos ***@***.***> wrote:
@Snorlock <https://github.com/Snorlock> @chuyik
<https://github.com/chuyik> the original author has not responded in a
while. If you're interested in fixing this, feel free to send a PR.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8950 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADLprxAVkZDzxQqWcgtYHlCA1P-2uoZnks5rfI1FgaJpZM4JSGM1>
.
|
vongohren
commented
Mar 8, 2017
It was closed because? |
hramos
commented
Mar 8, 2017
@Snorlock the author stated multiple times they will open a new PR that addresses the feedback provided above. |
This is a small fix in the runAndroid that instead of using the AndroidManifest file from the src at
app/src/main/AndroidManifest.xmluses the manifest file that is generated during the build process to find out the correct package name and activity name. As a result, it solves the issue whererunAndroidcommand fails to start the app after installing it.Relevant Issue: #5546