Change package name for Android in React Native

后端 未结 20 1868
鱼传尺愫
鱼传尺愫 2020-11-30 16:13

I used react-native init MyApp to initialise a new React Native app. This created among others an Android project with the package com.myapp.

20条回答
  •  北荒
    北荒 (楼主)
    2020-11-30 16:57

    I've used the react-native-rename package.

    In terminal run the command to install:

    npm install react-native-rename -g
    

    In the root of your React Native project, run the following command:

    react-native-rename "NewNameOfApp" -b com.companyname.newnameofapp
    

提交回复
热议问题