Showing posts with label React-native. Show all posts
Showing posts with label React-native. Show all posts

Tuesday, June 4, 2019

Android project not found. Maybe run react-native android first?

You may encounter this "Android project not found. Maybe run react-native android first" error message when you try to deploy the react-native application to your mobile device. As far as I figured there are two things that you may have to do while doing a fix for this issue.

1. Straight forward solution.  
In most of the cases, this will sort out this error by upgrading the react-native package in the root folder.
  • Go to the Project Root.
  • Upgrade the React native package in the Command Prompt by typing :
        react-native upgrade
  • Then Accept to update all the Files by typing y (Yes) in the Command Prompt.
2. GIT based upgrade.
You might see another option saying to upgrade git related package as the following message:
"You should consider using the new upgrade tool based on Git. It makes upgrades easier by resolving most conflicts automatically."

  • Go back to the old version of React Native.
  • Run npm install -g react-native-git-upgrade
  • Run react-native-git-upgrade
See https://facebook.github.io/react-native/docs/upgrading.html
Your project needs to have a name, declared in package.json, such as "name": "AwesomeApp". Please add a project name. Aborting.