Skip to content

How to change app name? #465

@MartinOrtiz

Description

@MartinOrtiz

Apparently all hell breaks loose when you try to change the name...
(this is for android build on Windows 10 pc)

The way you're supposed be able to do this is....

  1. delete android folder
  2. in package.json, provide new name for app
    ...
    "name": "rxp-jupiter",
    ...
  3. in root folder for app, do
    react-native upgrade.

This will re-creacte the android folder using the new name in the appropriate files
But it is incorrect, as it uses the "-", when it should drop the "-"
for example, in MainActivity.java and MainApplication.java, it has
package com.rxp-jupiter;
and the path to the files also uses the "-"
android\app\src\main\java\com\rxp-jupiter\MainActivity.java
It SHOULD BE.....
package com.rxpjupiter; (with the "-" dropped)
and the path to the files, should also drop the "-"
android\app\src\main\java\com\rxpjupiter\MainActivity.java

Now if I go back to package.json, and change the name, to not use any dashes
"name": "rxpjupiter",
and do "react-native upgrade"
I have no issues, and I have to go to Android studio, and import the Android app (by clicking on android folder), it will ask to upgrade to gradle 4.0, which I do, then I can build the project, then if I go to Run->debug 'app' in Android Studio, it will install the app on the emulator that I have running.

At this point, I get an error about bundler server...

I then open a node.js command prompt and CD to folder, and do an "npm start"
Then in emulator I reload the app, I can see in command prompt the bundle server is now working...but at the end I then get the red screen on the emulator with this error : "Application rxpjupiter has not been registered"

So there is some place where rxpjupiter is not used or updated to it, or what, I don't know....

How do I properly change/update app name for ReactXP project?
How do I fix the "not been registered" error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions