'Cannot find AndroidManifest when building react-native app for Android

I'm trying to build my react-native app for android. I can build it for iOS without any problem, but I'm having problems with Android.

When I do ./gradlew assembleDebug inside the android folder to generate an apk I receive the following error:

Task :generateDebugBuildConfig FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':generateDebugBuildConfig'.
> Error while evaluating property 'buildConfigPackageName' of task ':generateDebugBuildConfig'
   > Failed to calculate the value of task ':generateDebugBuildConfig' property 'buildConfigPackageName'.
      > Failed to query the value of property 'packageName'.
         > Manifest file does not exist: /Users/user/Desktop/app_name/app_name/android/src/main/AndroidManifest.xml

My AndroidManifest is not present at that path, but in the following path: /Users/user/Desktop/app_name/app_name/android/app/src/main/AndroidManifest.xml

I know maybe it's a stupid question, but how do I change the location where to search the AndroidManifest?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source