Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find symbol import com.facebook.react.ReactApplication #316

Closed
seque1990 opened this issue Dec 22, 2017 · 1 comment
Closed

cannot find symbol import com.facebook.react.ReactApplication #316

seque1990 opened this issue Dec 22, 2017 · 1 comment
Assignees

Comments

@seque1990
Copy link

OS:

  • MacOS

Platform:

  • Android

React Native Version: 0.41.2
React Native Sentry Version: 0.32.0

I have following issue when trying to run the Android App:

(path to app)/node_modules/react-native-sentry/android/src/main/java/io/sentry/RNSentryModule.java:8: error: cannot find symbol
import com.facebook.react.ReactApplication;
                         ^
  symbol:   class ReactApplication
  location: package com.facebook.react
(path to app)/node_modules/react-native-sentry/android/src/main/java/io/sentry/RNSentryModule.java:59: error: cannot find symbol
    private final ReactApplication reactApplication;
                  ^
  symbol:   class ReactApplication
  location: class RNSentryModule
(path to app)/node_modules/react-native-sentry/android/src/main/java/io/sentry/RNSentryModule.java:68: error: cannot find symbol
    public RNSentryModule(ReactApplicationContext reactContext, ReactApplication reactApplication) {
                                                                ^
  symbol:   class ReactApplication
  location: class RNSentryModule
(path to app)/react-native-sentry/android/src/main/java/io/sentry/RNSentryModule.java:76: error: cannot find symbol
    public ReactApplication getReactApplication() {
           ^
  symbol:   class ReactApplication
  location: class RNSentryModule
(path to app)/node_modules/react-native-sentry/android/src/main/java/io/sentry/RNSentryPackage.java:8: error: cannot find symbol
import com.facebook.react.ReactApplication;
                         ^
  symbol:   class ReactApplication
  location: package com.facebook.react
(path to app)/node_modules/react-native-sentry/android/src/main/java/io/sentry/RNSentryPackage.java:17: error: cannot find symbol
    private final ReactApplication reactApplication;
                  ^
  symbol:   class ReactApplication
  location: class RNSentryPackage
(path to app)/node_modules/react-native-sentry/android/src/main/java/io/sentry/RNSentryPackage.java:19: error: cannot find symbol
    public RNSentryPackage(ReactApplication reactApplication) {
                           ^
  symbol:   class ReactApplication
  location: class RNSentryPackage
(path to app)/node_modules/react-native-sentry/android/src/main/java/io/sentry/RNSentryPackage.java:23: error: cannot find symbol
    public ReactApplication getReactApplication() {
           ^
  symbol:   class ReactApplication
  location: class RNSentryPackage
(path to app)/node_modules/react-native-sentry/android/src/main/java/io/sentry/RNSentryModule.java:193: error: cannot find symbol
            for (Map.Entry<String, Object> data : ((ReadableNativeMap)breadcrumb.getMap("data")).toHashMap().entrySet()) {
                                                                                                ^
  symbol:   method toHashMap()
  location: class ReadableNativeMap
(path to app)/node_modules/react-native-sentry/android/src/main/java/io/sentry/RNSentryModule.java:237: error: cannot find symbol
            for (Map.Entry<String, Object> entry : castEvent.getMap("extra").toHashMap().entrySet()) {
                                                                            ^
  symbol:   method toHashMap()
  location: class ReadableNativeMap
(path to app)/node_modules/react-native-sentry/android/src/main/java/io/sentry/RNSentryModule.java:243: error: cannot find symbol
            for (Map.Entry<String, Object> entry : castEvent.getMap("tags").toHashMap().entrySet()) {
                                                                           ^
  symbol:   method toHashMap()
  location: class ReadableNativeMap
(path to app)/node_modules/react-native-sentry/android/src/main/java/io/sentry/RNSentryModule.java:289: error: cannot find symbol
            userBuilder.setData(((ReadableNativeMap)user.getMap("extra")).toHashMap());
                                                                         ^
  symbol:   method toHashMap()
  location: class ReadableNativeMap
(path to app)/node_modules/react-native-sentry/android/src/main/java/io/sentry/RNSentryModule.java:302: error: cannot find symbol
            for (Map.Entry<String, Object> entry : extra.toHashMap().entrySet()) {
                                                        ^
  symbol:   method toHashMap()
  location: variable extra of type WritableNativeMap
(path to app)/node_modules/react-native-sentry/android/src/main/java/io/sentry/RNSentryModule.java:310: error: cannot find symbol
            for (Map.Entry<String, Object> entry : ((ReadableNativeMap)tags).toHashMap().entrySet()) {
                                                                            ^
  symbol:   method toHashMap()
  location: class ReadableNativeMap
(path to app)/node_modules/react-native-sentry/android/src/main/java/io/sentry/RNSentryModule.java:417: error: cannot find symbol
            for (Map.Entry<String, Object> entry : extra.toHashMap().entrySet()) {
                                                        ^
  symbol:   method toHashMap()
  location: variable extra of type WritableNativeMap

I don't know much Java, so I am hoping I am just doing something wrong.

@HazAT HazAT self-assigned this Dec 27, 2017
@HazAT
Copy link
Member

HazAT commented Dec 27, 2017

Hey, it looks like something wrong with you linking process.
Did you call react-native link react-native-sentry?
Also, you react-native version seems very old, consider upgrading it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants