tinycreative / react-native-intercom

React Native wrapper for Intercom.io
MIT License
406 stars 280 forks source link

Android issue: cannot find symbol #324

Closed ghost closed 4 years ago

ghost commented 4 years ago

I followed the instructions to a T and can't figure out what the error could be here. Does anyone know why it couldn't find the symbol?

The only difference I can see is I have the following which is a bit different:

@Override
protected List<ReactPackage> getPackages() {
  @SuppressWarnings("UnnecessaryLocalVariable")
  List<ReactPackage> packages = new PackageList(this).getPackages();
  // Packages that cannot be autolinked yet can be added manually here, for example:
  // packages.add(new MyReactNativePackage());
  packages.add(new IntercomPackage());

  return packages;
}

Here is the error

 Task :app:compileReleaseJavaWithJavac FAILED
/home/circleci/android/android/app/src/main/java/com/project/MainApplication.java:18: error: cannot find symbol
import io.intercom.android.sdk.Intercom;
                              ^
  symbol:   class Intercom
  location: package io.intercom.android.sdk
/home/circleci/android/android/app/src/main/java/com/project/MainApplication.java:55: error: cannot find symbol
        Intercom.initialize(this, "android_sdk-1234567890", "du23522pr");
        ^
  symbol:   variable Intercom
  location: class MainApplication
ghost commented 4 years ago

I forgot to put this:

dependencies {
    implementation 'io.intercom.android:intercom-sdk-base:6.+'
}