Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

error Android project not found. #69

Open
jasontumusiime opened this issue Jul 23, 2021 · 2 comments
Open

error Android project not found. #69

jasontumusiime opened this issue Jul 23, 2021 · 2 comments

Comments

@jasontumusiime
Copy link

jasontumusiime commented Jul 23, 2021

When I used this package, my main AndroidManifest.xml was modified and the opening <Application> tag was deleted so I kept on getting the following error on $npx react-native run-android:

error Android project not found. Are you sure this is a React Native project? If your Android files are located in a non-standard location (e.g. not inside 'android' folder), consider setting 'project.android.sourceDir' option to point to a new location. Run CLI with --verbose flag for more details.

I tried $npx react-native upgrade as a suggested solution and it too failed with the following error:

error Unexpected close tag
Line: 30
Column: 16
Char: >. Run CLI with --verbose flag for more details.
Error: Unexpected close tag
Line: 30
Column: 16
Char: >
    at error (/.../node_modules/sax/lib/sax.js:651:10)
    at strictFail (/.../node_modules/sax/lib/sax.js:677:7)

I had to revert using git to fix the lost <application...> tag.

react-native: ~0.63.4,
react-native-make: 3.0.3

Thank you.

@JasmineCA
Copy link

I got the same issue with an expo project ejected to react native and using "react-native set-icon --platform android"

@mariansam
Copy link

I'm also using a bare Expo project and the Android manifest file got corrupted.

Solution

When your Android manifest got corrupted:

  1. git restore --staged android/app/src/main/AndroidManifest.xml (this unstages the file from git)
  2. git checkout android/app/src/main/AndroidManifest.xml (this puts the file to its original state)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants