Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AndroidManifest.xml doesn't exist or has incorrect root tag for React Native

I can't even setup react native. it's showing this error

I can't even setup react native. it's showing this error

like image 930
Ruhul Avatar asked Dec 11 '22 03:12

Ruhul


2 Answers

You've opened Android Studio in the wrong folder, you need to open the android folder rather than the projects root folder in Android Studio.

How to open an Android project correctly in Android Studio

When you open Android Studio, select Open an existing Android Studio project android studio

Navigate to the android folder inside your project's root directory, select the folder named android and then click open.

Here my app is called NewApp so I navigate to that folder and then find the android folder.

folder selection

You should then see something like this:

android studio

like image 128
Andrew Avatar answered Dec 28 '22 08:12

Andrew


The right way to open android project is to open project level build.gradle file when open from android studio (Just browse and double tab build.gradle file) for normal and react-native project both. Please see the selected file in screenshot for reference.

Screenshot

like image 36
Nitish Avatar answered Dec 28 '22 07:12

Nitish