React-native-firebase: 馃敟RNFirebaseInvites - error: cannot find symbol

Created on 13 Dec 2018  路  23Comments  路  Source: invertase/react-native-firebase

Issue

ON ANDROID ONLY - iOS WORKS FINE
When running ./gradlew assembleRelease I get the following error from RNFirebaseInvites:
(which is a module I am not even implementing)

> Task :react-native-firebase:compileReleaseJavaWithJavac FAILED
file or directory '/Users/waltermonecke/Documents/Code/React-Native/lisdoWorker/node_modules/react-native-firebase/android/src/release/java', not found
file or directory '/Users/waltermonecke/Documents/Code/React-Native/lisdoWorker/node_modules/react-native-firebase/android/build/generated/source/aidl/release', not found
Task ':react-native-firebase:compileReleaseJavaWithJavac' is not up-to-date because:
  Task has failed previously.
All input files are considered out-of-date for incremental task ':react-native-firebase:compileReleaseJavaWithJavac'.
Compiling with source level 1.8 and target level 1.8.
:react-native-firebase:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
file or directory '/Users/waltermonecke/Documents/Code/React-Native/lisdoWorker/node_modules/react-native-firebase/android/src/release/java', not found
file or directory '/Users/waltermonecke/Documents/Code/React-Native/lisdoWorker/node_modules/react-native-firebase/android/build/generated/source/aidl/release', not found
Compiling with JDK Java compiler API.
/Users/waltermonecke/Documents/Code/React-Native/lisdoWorker/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/invites/RNFirebaseInvites.java:190: error: cannot find symbol
        mPromise.resolve(Arguments.fromList(Arrays.asList(ids)));
                                  ^
  symbol:   method fromList(List<String>)
  location: class Arguments

android/build.gradle

buildscript {
    repositories {
        google()
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }  
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.0'
        classpath 'com.google.gms:google-services:4.0.2'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        // Add jitpack repository (added by tipsi-stripe)
        maven { url "https://jitpack.io" }
        mavenLocal()
        google()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        configurations.all {
            resolutionStrategy {
                force 'com.facebook.android:facebook-android-sdk:4.28.0'
                force 'com.android.support:support-v4:27.1.0'
                force 'com.android.support:design:27.1.0'
            }
        }
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
}

subprojects {
    if (project.name.contains('react-native-image-picker') || 
        project.name.contains('react-native-vector-icons')) {
        buildscript {
            repositories {
                jcenter()
                maven { url "https://dl.bintray.com/android/android-tools/"  }
            }
        }
    }
}

android/app/build.gradle

apply plugin: "com.android.application"

import com.android.build.OutputFile

apply from: "../../node_modules/react-native/react.gradle"

def enableSeparateBuildPerCPUArchitecture = false

def enableProguardInReleaseBuilds = false

android {
compileSdkVersion 28
buildToolsVersion "28.0.2"

    defaultConfig {
        applicationId "com.lisdoworker"
        minSdkVersion 18
        targetSdkVersion 28
        versionCode 14
        versionName "1.0.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
        manifestPlaceholders = [
            tipsiStripeRedirectScheme: "example"
        ]
        multiDexEnabled true
    }
    signingConfigs {
        release {
          storeFile file(MYAPP_RELEASE_STORE_FILE)
          storePassword MYAPP_RELEASE_STORE_PASSWORD
          keyAlias MYAPP_RELEASE_KEY_ALIAS
          keyPassword MYAPP_RELEASE_KEY_PASSWORD
        }
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86"
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "x86":2]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }
    dexOptions {
        jumboMode true
    }
}

dependencies {
    // react-native-firebase
    implementation project(':react-native-firebase')
    implementation ("com.google.android.gms:play-services-base:16.0.1") {
        force = true
    }
    implementation "com.google.firebase:firebase-core:16.0.4"

    implementation project(':react-native-fast-image')
    implementation project(':tipsi-stripe')
    implementation project(':react-native-extra-dimensions-android')
    implementation project(':react-native-google-places')
    implementation project(':react-native-vector-icons')
    implementation project(':react-native-linear-gradient')
    implementation project(':react-native-image-picker')
    implementation project(':react-native-fetch-blob')
    implementation project(':react-native-fbsdk')
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.android.support:appcompat-v7:27.1.0"
    implementation "com.facebook.react:react-native:+"  // From node_modules
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}

apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

MainApplication.java

package com.lisdoworker;

import android.app.Application;
import android.content.Intent;

import com.facebook.CallbackManager;
import com.facebook.FacebookSdk;
import com.facebook.reactnative.androidsdk.FBSDKPackage;
import com.facebook.appevents.AppEventsLogger;

import com.facebook.react.ReactApplication;
import io.invertase.firebase.RNFirebasePackage;
import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;
import com.dylanvann.fastimage.FastImageViewPackage;
import com.gettipsi.stripe.StripeReactPackage;
import ca.jaysoo.extradimensions.ExtraDimensionsPackage;
import com.arttitude360.reactnative.rngoogleplaces.RNGooglePlacesPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.BV.LinearGradient.LinearGradientPackage;
import com.imagepicker.ImagePickerPackage;
import com.RNFetchBlob.RNFetchBlobPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;

import java.util.Arrays;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {

  private static CallbackManager mCallbackManager = CallbackManager.Factory.create();

  protected static CallbackManager getCallbackManager() {
    return mCallbackManager;
  }

  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
    @Override
    public boolean getUseDeveloperSupport() {
      return BuildConfig.DEBUG;
    }

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
        new MainReactPackage(),
        new RNFirebasePackage(),
        new RNFirebaseNotificationsPackage(),
        new FastImageViewPackage(),
        new StripeReactPackage(),
        new ExtraDimensionsPackage(),
        new RNGooglePlacesPackage(),
        new VectorIconsPackage(),
        new LinearGradientPackage(),
        new ImagePickerPackage(),
        new RNFetchBlobPackage(),
        new FBSDKPackage(mCallbackManager)
      );
    }
  };

  @Override
  public ReactNativeHost getReactNativeHost() {
    return mReactNativeHost;
  }

  @Override
  public void onCreate() {
    super.onCreate();
    FacebookSdk.sdkInitialize(getApplicationContext());
    SoLoader.init(this, /* native exopackage */ false);
    AppEventsLogger.activateApp(this);
  }
}

package.json

"react-native": "0.47.1",
"react-native-firebase": "^5.1.1",

I see this issues here is very similar, however there was no solution?

And this issue, but solutions include going to v4 which is a no-no

Any help is welcome!

Most helpful comment

Try change your compileSdkVersion(buildToolsVersion and gradle if apply) to 28 since getNotificationChannelGroup was added in api 28

All 23 comments

See here: Version supported
Upgrade your RN version would resolve the issue.

See here: Version supported
Upgrade your RN version would resolve the issue.

Hi, I was following Option 1 of this guide and I have similar issues but I have the right supported versions. Below are the compile error as well as some details.

Error

> Task :react-native-firebase:compileDebugJavaWithJavac FAILED
C:\Users\Gillford\Desktop\DuduReactNativeApp\dudu_react_native\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:231: error: cannot find symbol
      return createChannelGroupMap(notificationManager.getNotificationChannelGroup(channelGroupId));
                                                      ^
  symbol:   method getNotificationChannelGroup(String)
  location: variable notificationManager of type NotificationManager
C:\Users\Gillford\Desktop\DuduReactNativeApp\dudu_react_native\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:331: error: cannot find symbol
        notificationChannelGroup.setDescription(description);
                                ^
  symbol:   method setDescription(String)
  location: variable notificationChannelGroup of type NotificationChannelGroup
C:\Users\Gillford\Desktop\DuduReactNativeApp\dudu_react_native\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:407: error: cannot find symbol
        writableMap.putString("description", notificationChannelGroup.getDescription());
                                                                     ^
  symbol:   method getDescription()
  location: variable notificationChannelGroup of type NotificationChannelGroup
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

android/build.gradle

buildscript {
    ext {
        buildToolsVersion = "27.0.3"
        minSdkVersion = 16
        compileSdkVersion = 27
        targetSdkVersion = 26
        supportLibVersion = "27.1.1"
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'
        classpath 'com.google.gms:google-services:4.2.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        google()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}


task wrapper(type: Wrapper) {
    gradleVersion = '4.4'
    distributionUrl = distributionUrl.replace("bin", "all")
}

android/app/build.gradle

apply plugin: "com.android.application"

import com.android.build.OutputFile

project.ext.react = [
    entryFile: "index.js"
]

apply from: "../../node_modules/react-native/react.gradle"

def enableSeparateBuildPerCPUArchitecture = false

def enableProguardInReleaseBuilds = false

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
        applicationId "com.dudu_react_native"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
        missingDimensionStrategy 'react-native-camera', 'general'
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86"
        }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "x86":2]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }
}

dependencies {
    compile project(':react-native-firebase')
    compile project(':react-native-image-picker')
    compile project(':react-native-camera')
    compile project(':react-native-webview')
    compile project(':react-native-gesture-handler')
    compile project(':react-native-orientation')
    compile project(':react-native-immersive')
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation 'com.google.firebase:firebase-core:16.0.8'
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}

apply plugin: 'com.google.gms.google-services'

MainApplication.java

package com.dudu_react_native;

import android.app.Application;

import com.facebook.react.ReactApplication;
import io.invertase.firebase.RNFirebasePackage;
import com.imagepicker.ImagePickerPackage;
import org.reactnative.camera.RNCameraPackage;
import com.reactnativecommunity.webview.RNCWebViewPackage;
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
import com.github.yamill.orientation.OrientationPackage;
import com.rnimmersive.RNImmersivePackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;

import java.util.Arrays;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {

  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
    @Override
    public boolean getUseDeveloperSupport() {
      return BuildConfig.DEBUG;
    }

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
            new RNFirebasePackage(),
            new ImagePickerPackage(),
            new RNCameraPackage(),
            new RNCWebViewPackage(),
            new RNGestureHandlerPackage(),
            new OrientationPackage(),
            new RNImmersivePackage()
      );
    }

    @Override
    protected String getJSMainModuleName() {
      return "index";
    }
  };

  @Override
  public ReactNativeHost getReactNativeHost() {
    return mReactNativeHost;
  }

  @Override
  public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
  }
}

package.json

"react-native": "0.57.7",
"react-native-firebase": "^5.3.0",

Try change your compileSdkVersion(buildToolsVersion and gradle if apply) to 28 since getNotificationChannelGroup was added in api 28

Try change your compileSdkVersion(buildToolsVersion and gradle if apply) to 28 since getNotificationChannelGroup was added in api 28

I have made the following changes in android/build.gradle

buildscript {
    ext {
        buildToolsVersion = "28.0.2" // default is "27.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28 // default is 27
        targetSdkVersion = 26
        supportLibVersion = "27.1.1"
    }
    ...
}

Now it can build successfully but it immediately crashed when starting intent.

I think you will also want supportLibVersion 28.0.0 - why not the latest?

You aren't specifying play services either, you may want like

buildscript {
    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28
        targetSdkVersion = 28
        supportLibVersion = "28.0.0"
        supportVersion = "28.0.0"
        googlePlayServicesLocationVersion = "16.0.0"
        googlePlayServicesVersion = "16.0.0"
        googlePlayServicesVisionVersion = "17.0.2"
        reactNativeVersion = "+"

(yes a couple of those are redundant - this is likely more than you - or I - need but it does run...)

I think you will also want supportLibVersion 28.0.0 - why not the latest?

You aren't specifying play services either, you may want like

buildscript {
    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28
        targetSdkVersion = 28
        supportLibVersion = "28.0.0"
      supportVersion = "28.0.0"
        googlePlayServicesLocationVersion = "16.0.0"
        googlePlayServicesVersion = "16.0.0"
        googlePlayServicesVisionVersion = "17.0.2"
        reactNativeVersion = "+"

(yes a couple of those are redundant - this is likely more than you - or I - need but it does run...)

I have tried your suggestion and is still the same. In case you didn't notice, I was following Option 1 of this guide.

Hard to tell without any crash info..Check your logcat when open the app and you should able to find something.

I was not able to reproduce the bug by creating a brand new project. So I just ditched the old project. Thank you for the responses guys.

Hi :wave:
I have also faced this error in RNFirebaseNotificationManager.java . Can you please guide me to solve this error ?
These are the followings method are missing:

  1. notificationChannelGroup.getDescription() ,
  2. notificationChannelGroup.setDescription(description)
  3. notificationManager.getNotificationChannelGroup(channelGroupId)

Version
"react-native-firebase": "^5.2.2"

build.gradle

buildscript {
  repositories {
    google()
    jcenter()
    maven {
      url 'https://maven.fabric.io/public'
    }
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:3.3.2'
  }
}

apply plugin: 'com.android.library'

def DEFAULT_COMPILE_SDK_VERSION = 28
def DEFAULT_TARGET_SDK_VERSION = 28
def DEFAULT_SUPPORT_LIB_VERSION = "28.0.0"

android {
  compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
  defaultConfig {
    minSdkVersion 16
    targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
  }
  buildTypes {
    release {
      minifyEnabled false
    }
  ....
  }

root app

ext {
    compileSdkVersion   = 27
    targetSdkVersion    = 27
    minSdkVersion       = 16
    buildToolsVersion   = "27.0.3"
    supportLibVersion   = "27.0.2"
    googlePlayServicesVersion = "15.0.1"
    facebookSdkVersion = "4.37.0"
}

compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION This line would use compileSdkVersion=27 instead of DEFAULT_COMPILE_SDK_VERSION = 28

@Chenjh1992 thank you for your response. Yes you are right I can write compileSdkVersion=27 but I get my answer from your point. The react lib using 28 version and root app using 27. I just simply updated the root app version in ext to 28. The problem is solved now.

Thank you everyone for your communication and contribution to this issue.

ext {
//    compileSdkVersion   = 27
//    targetSdkVersion    = 27
//    minSdkVersion       = 16
//    buildToolsVersion   = "27.0.3"
//    supportLibVersion   = "27.0.2"

    buildToolsVersion = "28.0.3"
    minSdkVersion = 16
    compileSdkVersion = 28
    targetSdkVersion = 28
    supportLibVersion = "28.0.0"
    supportVersion = "28.0.0"
    googlePlayServicesVersion = "15.0.1"
    facebookSdkVersion = "4.37.0"
}

Hi All, I am also getting same error. Following is my error and build.gradle.

> Task :react-native-firebase:compileDebugJavaWithJavac FAILED
/Users/sujit/Documents/Projects/AdPost/SourceCode_Names/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/perf/RNFirebasePerformance.java:126: error: cannot find symbol
    getOrCreateTrace(identifier).incrementCounter(event);
                                ^
  symbol:   method incrementCounter(String)
  location: class Trace
/Users/sujit/Documents/Projects/AdPost/SourceCode_Names/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/notifications/RNFirebaseNotificationManager.java:231: error: cannot find symbol
      return createChannelGroupMap(notificationManager.getNotificationChannelGroup(channelGroupId));
                                                      ^
  symbol:   method getNotificationChannelGroup(String)
  location: variable notificationManager of type NotificationManager
/Users/sujit/Documents/Projects/AdPost/SourceCode_Names/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/notifications/RNFirebaseNotificationManager.java:331: error: cannot find symbol
        notificationChannelGroup.setDescription(description);
                                ^
  symbol:   method setDescription(String)
  location: variable notificationChannelGroup of type NotificationChannelGroup
/Users/sujit/Documents/Projects/AdPost/SourceCode_Names/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/notifications/RNFirebaseNotificationManager.java:407: error: cannot find symbol
        writableMap.putString("description", notificationChannelGroup.getDescription());
                                                                     ^
  symbol:   method getDescription()
  location: variable notificationChannelGroup of type NotificationChannelGroup
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors

build.gradle
```
compileSdkVersion 28
buildToolsVersion "28.0.3"

defaultConfig {
    applicationId "com.companyName"
    minSdkVersion 16
    targetSdkVersion 28
    versionCode 1
    multiDexEnabled true
    versionName "1.0"
    ndk {
        abiFilters "armeabi-v7a", "x86"
    }
}

```

@sujitpk-perennial this is a closed issue, if you have problems please open a new issue following the template provided so others can help

I've fixed this issue in my code just adding these lines in android/app/src/main/java/com/myapp/MainApplication.java:

// this import is for another package
import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;
// this is the import that fixed my issue
import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;

this does not help I still have the same error

me too...

I'm facing the same issue.

This is a closed and very old issue. Please open a new one following the template, but also please make sure you are using compatible versions from the "Getting Started" page on the rnfirebase.io docs site, because I ton't think invites even exists any more in v5.5.x

in my case, I have down graded my react native firebase version from 5.5.1 to 5.2.3 and its working fine.

@abhisri2090 no, it's not really working fine. Invites are discontinued and you can't successfully use versions of the underlying SDKs that work on iOS13 and Android 9+. I'm not even sure you can do releases on react-native 0.58+ which are required to target Android SDK 28+ which is required to upload any builds to the Play Store

i get this error right after installing firebase with the quick start
Task :app:processDebugGoogleServices FAILED

@alejandroyunes posting that comment on a solved issue won't get help - please open a new issue following the complete template and double-checking you followed the docs right. Here is an example if you want to see all the integration steps https://github.com/mikehardy/rnfbdemo/blob/master/make-demo-v6.sh

Try change your compileSdkVersion(buildToolsVersion and gradle if apply) to 28 since getNotificationChannelGroup was added in api 28

I have made the following changes in android/build.gradle

buildscript {
    ext {
        buildToolsVersion = "28.0.2" // default is "27.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28 // default is 27
        targetSdkVersion = 26
        supportLibVersion = "27.1.1"
    }
    ...
}

Now it can build successfully but it immediately crashed when starting intent.

This solution worked for me, Thanks !

Was this page helpful?
0 / 5 - 0 ratings