-
Notifications
You must be signed in to change notification settings - Fork 906
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
[Android] Derive default app id from application id, not package name #1884
Comments
Sounds reasonable. Can I pick your brain on that @cortinico? |
Sure. So the thing is that we both:
Currently we default to read either the The problem is, as @simon-abbott said, we're reading only one field and using it for two things. We should either:
|
I think option 1 is far more intuitive. I would expect that the There are two types of people using this:
Additionally, there are a further two groups of people:
With the current implementation we have the following:
If we change the implementation to use the
This way if the app id you want to launch is the one you are building, then you don't need to use any flags, regardless of your code's |
Sounds reasonable. Maybe we could detect and pass both values into Android projectConfig and then use one for building and second for installing the app? We could even pop in a warning that both are different and inform user we're selecting one? Also I've noticed that when *.apk is built whe get |
Yup this sounds great to me 👍 |
Created draft PR what will extract appId from default config of build.gradle. |
Describe the Feature
In most cases the application id and package name / namespace are the same string. However in some cases they are not. For example, if a project got renamed but didn't want to change all their native code, or they ship with different app ids for prod, testing, local development, etc. This raises the question: why is the default app id (if you don't explicitly pass
--appId
) based on the package name and not the actual application id?For example, if I have a React Native 0.71 project with the
android/app/build.gradle
configured withthen running
react-native run-android
with no other flags will successfully build and install on the device, but will fail to start because it's trying to run the appcom.example.foo
.I think a much more sensible default value would be to use the actual resolved
applicationId
value.Possible Implementations
Related Issues
The text was updated successfully, but these errors were encountered: