1

I want to use the react-native-community/geolocation in my project. I followed this documentation on GitHub, including the editing of the AndroidManifest.xml etc..

Installing it via

npm install @react-native-community/geolocation --save

and importing it in the project via

import Geolocation from '@react-native-community/geolocation';

The error is:

enter image description here

My package.json (after uninstalling geolocation):

package.json file

I tried downgrading the geolocation library to 2.0.2; linking the module manually and following the workarounds described here. Nothing seems to work.

4
  • your package.json is missing the library Commented Oct 11, 2023 at 7:21
  • @Engr.AftabUfaq I uninstalled the package after it wasn't working. I checked when running npm install if the package.json is updated and that was the case, so this is not the issue Commented Oct 11, 2023 at 7:31
  • after installing this package you have to delete the old build. go to andoird folder and Bradley clean then again build the project and test it Commented Oct 11, 2023 at 7:35
  • @Engr.AftabUfaq I ran ./gradlew clean after installing or changing version of geolocation. Usually, this shouldn't be necessary but as a precaution I did try. No luck though Commented Oct 11, 2023 at 7:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.