Error type 3. Activity class {com.awesome_project/ com.awesome_project.MainActivity} does not exist in react native (Android device)

后端 未结 24 1600
甜味超标
甜味超标 2021-01-30 20:10

I\'ve created the project using the following command.

react-native init Awesome_Project

I\'ve started the packager using the following com

24条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-30 20:41

    If you have appIdSuffix you should add it to the command for react native run command.

    eg.   react-native run-android --appIdSuffix beta
    

    Should add shortcut to package.json and run via npm.

    ...
    "scripts": {
     ...
      "android-beta": "react-native run-android --appIdSuffix beta",
    },
    

    Then just run:

    npm run android-beta
    

提交回复
热议问题