Change package name for Android in React Native

后端 未结 20 1839
鱼传尺愫
鱼传尺愫 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:39

    I use the react-native-rename* npm package. Install it via

    npm install react-native-rename -g
    

    Then, from the root of your React Native project, execute the following:

    react-native-rename "MyApp" -b com.mycompany.myapp
    

提交回复
热议问题