GithubHelp home page GithubHelp logo

Comments (6)

tstkenny avatar tstkenny commented on April 28, 2024

I got some progress.. if u do NOT rename the project by yarn, you can actually see RN's red background error screen with "Unable to connect with remote debugger"

from react-native-boilerplate.

tstkenny avatar tstkenny commented on April 28, 2024

I found that the gradle API level is 26 so make sure your environment complies.

Next step is to press Ctrl-M in android emulator -> Dev settings, put localhost:8081, then close all cmd boxes and restart.

Viola! It's working!

from react-native-boilerplate.

Zefau avatar Zefau commented on April 28, 2024

I'm facing the same issues renaming the project using yarn rename:

$ react-native-rename xxxxx
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
\android\app\src\main\res\values\strings.xml MODIFIED
\index.js MODIFIED
\package.json MODIFIED
\app.json MODIFIED
\android\settings.gradle MODIFIED
\app.json MODIFIED
The system cannot find the path specified.
\android\app\BUCK MODIFIED
\android\app\build.gradle MODIFIED
\android\app\src\main\AndroidManifest.xml MODIFIED
Done removing previous bundle directory.
Done removing builds.
APP SUCCESSFULLY RENAMED TO "xxxxx"! 🎉 🎉 🎉

With this, the app crashes immediately at startup.

from react-native-boilerplate.

JeremyDolle avatar JeremyDolle commented on April 28, 2024

Hi @Zefau ! Please check if all occurences are successfully renamed in :

Commun

  • App/index.js:
...
AppRegistry.registerComponent('XXXXXX', () => App)
  • App/app.json :
{
  "name": "XXXXXX",
  "displayName": "XXXXXX"
}

Android

  • /android/settings.gradle :
rootProject.name = 'XXXXXX'
...
  • /android/app/src/main/java/com/[yourprojectname]/MainActivity.java:
...
/**
     * Returns the name of the main component registered from JavaScript.
     * This is used to schedule rendering of the component.
     */
    @Override
    protected String getMainComponentName() {
        return "XXXXXX";
    }
...

iOS

  • app/ios/[YourProjectName]/Info.plist :
...
<key>CFBundleDisplayName</key>
<string>XXXXXX</string>
...
  • app/ios/[YourProjectName]/AppDelegate.m :
...
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                      moduleName:@"XXXXXX"
                                               initialProperties:nil
                                                   launchOptions:launchOptions];
  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
...

Make sure that you restart your Metro Bundler and rebuild the App.

from react-native-boilerplate.

Zefau avatar Zefau commented on April 28, 2024

The project name is updated in the following files

  • App/index.js
  • App/app.json
  • /android/settings.gradle

But the file MainActivity.java gets deleted once renaming the project. Thus /android/app/src/main/java/com/[yourprojectname]/MainActivity.java does not exist.

When I copy and edit the files manually, it works.
Edit: Shall I create an issue for this?

from react-native-boilerplate.

AurelGit avatar AurelGit commented on April 28, 2024

Thanks for the PR ! ❤️

Yes can you please create a dedicated issue to this problem ?

from react-native-boilerplate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.