-
-
Notifications
You must be signed in to change notification settings - Fork 197
Cannot change android package id via package.json #2089
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
Comments
I’ll note that my vote is for |
I vote for keep using one value (in package.json) and populate it in the native project. I've not tried the steps provided by @tjvantoll , but updating the file in app/App_Resources/Android/app.gradle seems incorrect for me. All placeholders should be replaced in the native project, not in the app directory. Here's the code that modifies the app.gradle.
For beginner users this will be really difficult to understand, so I vote to keep the id in package.json and make sure CLI works correctly with the id in different files. |
We can introduce logic that replaces the app_id from the |
Not sure if users (specially web developer we target) will be happy to manually edit |
We can't make a whole new abstraction by a common denominator over two totally different platforms in a sustainable and non-error-prone way. And when/if Windows come in the equation then it would become even harder to achieve so. Sometimes native just isn't evil, on the contrary - it provides better control and less confusion. It is our responsibility to educate our users on the why in such cases. And we should not be afraid to choose native paradigms as long as they provide better mechanism for handling such cases. That's my thinking. For example we are still experiencing significant issues because of the way we handle Android plugins. Instead of pushing plugin authors to use the native platform approach (*.AAR packages), we literally augment the platform and add plugins to a project through flavors. And flavors are meant to handle completely different cases. And what was the major reason behind this solution? People were afraid of building AAR packages. Why? Because, for some reason, we failed to explain why these are better sustainable in the long run and will be less error prone. And because our thinking is "native is a bad thing, make an abstraction". |
Can't we read the id from the Info.plist for iOS and the AndroidManifest.xml for android, instead of reading the package.json? |
Currently CLI reads the id from |
I tested this functionality, but I can't seem to get the iOS app to read its (I'm expecting to see I added When I try to remove iOS:
Android:
Am I missing some setting? |
We need an iOS expert here: ping @PanayotCankov |
These are two different issues here:
|
I vote for removing the |
closing in favor of: #2367 |
safe doing manually ? |
From https://github.com/NativeScript/docs/pull/496.
nativescript.id
in yourpackage.json
file.rm -rf platforms
tns install
tns run android --emulator
Expected: The
package
in the Android app’s manifest will be updated to the new value.Actual: No update occurs.
It seems that once an
App_Resources/Android/app.gradle
file exists, you must change your application id there rather than inpackage.json
. But that goes against what our documentation says.Where is the right place to change this value? We either need to update the CLI or the docs, and I’m not sure which.
Thanks.
The text was updated successfully, but these errors were encountered: