Skip to content

react-native upgrade will change the path of MainActivity.java, how to stay with the original path? #11163

@iapolog2u

Description

@iapolog2u

Description

How to stay with the original path of MainActivity.java?

I have cloned the f8app project

then run react-native upgrade in this project

It will create MainActivity.java at pathandroid/app/src/main/java/com/f8v2/MainActivity.java instead of use the original path.

the original path is

android/app/src/main/java/com/facebook/f8/MainActivity.java

below is my operation

$ git clone git@github.com:fbsamples/f8app.git
$ cd f8app
$ npm install
$ ls android/app/src/main/java/com/facebook/f8
MainActivity.java
$ react-native upgrade
Upgrading project to react-native v0.28.0
...
   create android/app/src/main/java/com/f8v2/MainActivity.java

Reproduction

please see the description

Additional Information

  • React Native version: 0.28.0+
  • Platform: android
  • Operating System: MacOS, Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions