getsentry / sentry-react-native

Official Sentry SDK for React Native
https://sentry.io
MIT License
1.58k stars 337 forks source link

[Android] Getting package io.sentry does not exist error when building for debug #167

Closed deathemperor closed 5 years ago

deathemperor commented 7 years ago

I followed this instructions https://docs.sentry.io/clients/react-native/

The errors:

:app:compileDebugJavaWithJavac D:\Atom\react-native-ui-kitten\examples\ExplorerApp\android\app\src\main\java\com\explorerapp\MainApplication.java:7: error: package io.sentry does not exist import io.sentry.RNSentryPackage; ^ D:\Atom\react-native-ui-kitten\examples\ExplorerApp\android\app\src\main\java\com\explorerapp\MainApplication.java:31: error: cannot find symbol new RNSentryPackage(MainApplication.this), ^ symbol: class RNSentryPackage 2 errors :app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'. Compilation failed; see the compiler error output for details.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

react-native link was successful. apply from: "../../node_modules/react-native-sentry/sentry.gradle" can be found in app\build.gradle.

ExplorerApp\node_modules\react-native-sentry\ is there

(I'm trying to test install sentry into the example app of react-native-ui-kitten)

deathemperor commented 7 years ago

the link command didn't adjust my app/build.gradle. I manually add compile project(':react-native-sentry') and it builds success

HazAT commented 6 years ago

This has happened again, but need a reproduction case.

HazAT commented 5 years ago

I am closing all old issues, please if this is still a problem feel free to revive it. Also, consider moving to our new SDK @sentry/react-native.