Sentry-react-native: [Android] Getting package io.sentry does not exist error when building for debug

Created on 25 Jul 2017  路  3Comments  路  Source: getsentry/sentry-react-native

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

The errors:

:app:compileDebugJavaWithJavac
D:Atomreact-native-ui-kittenexamplesExplorerAppandroidappsrcmainjavacomexplorerappMainApplication.java:7: error: package io.sentry does not exist
import io.sentry.RNSentryPackage;
^
D:Atomreact-native-ui-kittenexamplesExplorerAppandroidappsrcmainjavacomexplorerappMainApplication.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 appbuild.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)

馃react-native-sentry

Most helpful comment

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

All 3 comments

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

This has happened again, but need a reproduction case.

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.

Was this page helpful?
0 / 5 - 0 ratings