react.module.annotations does not exist
See original GitHub issueEnvironment
System: OS: macOS 10.14.5 CPU: (4) x64 Intel® Core™ i5-5257U CPU @ 2.70GHz Memory: 32.03 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.15.3 - /usr/local/bin/node Yarn: 1.16.0 - /usr/local/bin/yarn npm: 6.10.3 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3 Android SDK: API Levels: 28 Build Tools: 26.0.2, 27.0.3, 28.0.3, 29.0.1 System Images: android-28 | Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom IDEs: Android Studio: 3.5 AI-191.8026.42.35.5791312 Xcode: 10.3/10G8 - /usr/bin/xcodebuild npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.5 => 0.60.5 npmGlobalPackages: react-native-cli: 2.0.1
Platforms
This is for android only
Versions
- Android: 9 (Pie)
- react-native-geolocation: 2.0.2
- react-native: 0.60.5
- react: 16.8.6
Description
I just started to use React native community geolocation. It works fine with iOS, but for android it gives me these errors:
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
/node_modules/@react-native-community/geolocation/android/src/main/java/com/reactnativecommunity/geolocation/GeolocationModule.java:33: error: package com.facebook.react.module.annotations does not exist
import com.facebook.react.module.annotations.ReactModule;
/node_modules/@react-native-community/geolocation/android/src/main/java/com/reactnativecommunity/geolocation/GeolocationModule.java:35: error: package com.facebook.react.modules.permissions does not exist
import com.facebook.react.modules.permissions.PermissionsModule;
^
/node_modules/@react-native-community/geolocation/android/src/main/java/com/reactnativecommunity/geolocation/GeolocationModule.java:42: error: cannot find symbol
@ReactModule(name = GeolocationModule.NAME)
^
symbol: class ReactModule
/node_modules/@react-native-community/geolocation/android/src/main/java/com/reactnativecommunity/geolocation/GeolocationModule.java:128: error: cannot find symbol
final PermissionsModule perms = getReactApplicationContext().getNativeModule(PermissionsModule.class);
^
symbol: class PermissionsModule
location: class GeolocationModule
/node_modules/@react-native-community/geolocation/android/src/main/java/com/reactnativecommunity/geolocation/GeolocationModule.java:128: error: cannot find symbol
final PermissionsModule perms = getReactApplicationContext().getNativeModule(PermissionsModule.class);
^
symbol: class PermissionsModule
location: class GeolocationModule
5 errors
I tried cleaning, rebuilding, reinstalling node modules, etc. Nothing works. However, in Android studio, I do see this error in the “Sync”:
ERROR: The modules ['@react-native-community_geolocation', 'react-native-community-geolocation'] point to the same directory in the file system.
Each module must have a unique path.
Not sure if this is related or a completely different problem.
I didn’t do much to get this error, just npm installed react-native-community/geolocation and followed the instructions
Reproducible Demo
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:5
Any updates on this? Ran into the same issue while upgrading React Native to 0.60.5. Version of rn-geolocation is 2.0.2
Having the same issue on the latest react-native and rn-geo plugin