Skip to content

Wrong (or at least not descriptive) "error Android project not found" msg #1262

Description

@scarlehoff

Description

A badly formatted AndroidManifest file will make react-native run-android fail with the following message:

error Android project not found. Are you sure this is a React Native project? If your Android files are located in a non-standard lo
cation (e.g. not inside 'android' folder), consider setting `project.android.sourceDir` option to point to a new location

It will be very useful to either point to the actual error or just say that it could not run for some reason without giving a wrong reason.

React Native version:

Binaries:
Node: 14.3.0 - /usr/bin/node
Yarn: 1.22.4 - /usr/bin/yarn
npm: 6.14.5 - /usr/bin/npm
Watchman: 4.9.0 - /usr/bin/watchman
SDKs:
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.2, 29.0.3
System Images: android-29 | Google APIs Intel x86 Atom
npmPackages:
react: 16.11.0 => 16.11.0
react-native: 0.62.2 => 0.62.2
npmGlobalPackages:
react-native: 0.60.5

Steps To Reproduce

  1. Open android/app/src/main/AndroidManifest.xml
  2. Add some random mistakes
  3. Try to run react-native run-android

Great project and thank you very much for your hard work!

(originally put this issue in this repository: react/react-native#29035 but was told to bring it here!)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions