Platforms(Android/iOS/web/all): Android
(Developing under Windows 10 x64.)
My main project - originally built under Expo 38 but upgraded to Expo 40, ejected to RN, keeps requesting permissions about location, while I don’t use location features at all. I have been looking for solutions for 3 days now, to no avail. Tried everything in here: Removing location permission but none of this helped.
So, as a last resort, I decided to create a new Expo project with Expo 40 and latest React native. I ran a few simple steps that I followed from forum threads, but they don’t seem to do the trick: the new blank application still requests every possible permission. It’s as if I am missing something, or misunderstanding something? Here is what I did, step by step.
Step 2: open Visual Studio code and edit app.json, which now looks like this:
Step 3:
Delete folder /node_modules/expo-location
Step 4:
$ yarn android
Result: the application builds and runs well in the Android emulator. But the AndroidManifest.xml file in /android/app/src/main/AndroidManifest.xml still includes every single possible permission. Why?
I am quite new to mobile development and struggling with Expo, React Native, Android, iOS development, trying to connect the pieces but sometimes I feel like I’m missing things. I resort to reading and following the documentation step by step but sometimes it’s as if it just doesn’t work as expected.
Thank you brents, this is very helpful. To clarify, can you confirm that AndroidManifest.xml doesn’t get rebuilt, erased, or anything? I always assumed we couldn’t make changes to that file manually because they would somehow get erased or changed by … something (gradle? expo? react native? npm? yarn? no idea)
If this helps anyone, our application is simple and only requires Internet access (webview, fetch), as well as a QR code scanner that uses the camera and vibrates when a scan is successful.
This is our manifest with updated permissions. It took me 4 attempts to request the least number of permissions.