question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react.module.annotations does not exist

See original GitHub issue

Environment

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:open
  • Created 4 years ago
  • Reactions:12
  • Comments:5

github_iconTop GitHub Comments

5reactions
axeffcommented, Sep 2, 2019

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

4reactions
arpitjacobcommented, Sep 4, 2019

Having the same issue on the latest react-native and rn-geo plugin

Read more comments on GitHub >

github_iconTop Results From Across the Web

RN 0.60.0 error: package com.facebook.react.module ... - GitHub
RN 0.60.0 error: package com.facebook.react.module.annotations does not exist #153. AbanoubNassem opened this issue on Jul 8, 2019 · 16 comments.
Read more >
package com.facebook.react.module.annotations does not exist
I was working on this exact same project on expo, everything works perfectly. However, when i try to clone the project to a...
Read more >
error: package com.facebook.react.bridge does not exist
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with...
Read more >
package com.android.annotations does not exist-React Native
Coding example for the question error: package com.android.annotations does not exist-React Native.
Read more >
com.facebook.react.modules.storage.AsyncStorageModule ...
SetBuilder; import com.facebook.react.module.annotations. ... We're still not recovering from this well, but at least the error // will be reported to the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found