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

Task :react-native-push-notification:compileDebugJavaWithJavac FAILED all of a sudden #1979

Closed
Helen2hang opened this issue May 11, 2021 · 74 comments

Comments

@Helen2hang
Copy link

Bug

Two projects that uses this library. But suddenly we can't build them on Android anymore.
Task :react-native-push-notification:compileDebugJavaWithJavac FAILED

It seems like other people are having this issue too. But it might be related to react-native-fcm.
evollu/react-native-fcm#1111 (comment)
Anyone know how to fix it?

Environment info

react-native info output:


System:
    OS: macOS 10.15.7
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 82.62 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 13.8.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.4.1 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.0 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK:
      API Levels: 29, 30
      Build Tools: 28.0.3, 29.0.2, 30.0.2
      System Images: android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.6858069
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: 15.0.1 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1
    react-native: 0.63.4 => 0.63.4
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Library version: 7.2.3

Error:

> Task :react-native-push-notification:compileDebugJavaWithJavac FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings
148 actionable tasks: 146 executed, 2 up-to-date
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
Note: /Users/helenzhang/projects/akufen_icc_react-native/node_modules/react-native-background-downloader/android/src/main/java/com/eko/RNBackgroundDownloaderModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 warnings
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
Note: /Users/helenzhang/projects/akufen_icc_react-native/node_modules/@react-native-community/async-storage/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 warnings
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 warnings
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
Note: /Users/helenzhang/projects/akufen_icc_react-native/node_modules/react-native-fs/android/src/main/java/com/rnfs/RNFSManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 warnings
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
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.
3 warnings
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
Note: /Users/helenzhang/projects/akufen_icc_react-native/node_modules/react-native-localize/android/src/main/java/com/reactcommunity/rnlocalize/RNLocalizeModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 warnings
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
/Users/helenzhang/projects/akufen_icc_react-native/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:39: error: cannot find symbol
import com.google.firebase.iid.FirebaseInstanceId;
                              ^
  symbol:   class FirebaseInstanceId
  location: package com.google.firebase.iid
/Users/helenzhang/projects/akufen_icc_react-native/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:40: error: cannot find symbol
import com.google.firebase.iid.InstanceIdResult;
                              ^
  symbol:   class InstanceIdResult
  location: package com.google.firebase.iid
/Users/helenzhang/projects/akufen_icc_react-native/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:143: error: cannot find symbol
              .addOnCompleteListener(new OnCompleteListener<InstanceIdResult>() {
                                                            ^
  symbol:   class InstanceIdResult
  location: class RNPushNotification
/Users/helenzhang/projects/akufen_icc_react-native/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:145: error: cannot find symbol
                  public void onComplete(@NonNull Task<InstanceIdResult> task) {
                                                       ^
  symbol: class InstanceIdResult
/Users/helenzhang/projects/akufen_icc_react-native/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:142: error: cannot find symbol
      FirebaseInstanceId.getInstance().getInstanceId()
      ^
  symbol:   variable FirebaseInstanceId
  location: class RNPushNotification
/Users/helenzhang/projects/akufen_icc_react-native/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:289: error: cannot find symbol
                  FirebaseInstanceId.getInstance().deleteInstanceId();
                  ^
  symbol: variable FirebaseInstanceId
Note: /Users/helenzhang/projects/akufen_icc_react-native/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationHelper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/helenzhang/projects/akufen_icc_react-native/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
6 errors
3 warnings

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-push-notification:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

Steps To Reproduce

  1. npx react-native run-android

Describe what you expected to happen:

  1. App should build successfully on Android

Reproducible sample code

@jeffbonasso-ambifi
Copy link

Getting the exact same errors. I built probably 50 times with no issue, and then suddenly on multiple build machines this error started occurring. Suspect not specifically in this library but a low-level dependency that was pushed.

@catherinekorres
Copy link

I'm getting the same error, it started about an hour ago out of nowhere

@lourencorodrigo
Copy link

Getting the same error here.

@nikolaywithpara

This comment has been minimized.

@taltrui

This comment has been minimized.

@nikolaywithpara
Copy link

@taltrui I think none of us has fixed firebase messaging package version and firebase did new release with breaking changes

@mir1198yusuf
Copy link

/App/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:268: error: cannot find symbol
                  FirebaseInstanceId.getInstance().deleteInstanceId();
                  ^
  symbol: variable FirebaseInstanceId
Note: /App/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationHelper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
6 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-push-notification:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.


Is this the same error everyone facing ?

all of a sudden react-native run-android is failing due to this

@jeffbonasso-ambifi

This comment has been minimized.

@emrecanozkok
Copy link

emrecanozkok commented May 11, 2021

All Trace

/Users/emrecanozkok/Documents/workspace/projects/react-native-a11/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:39: error: cannot find symbol
import com.google.firebase.iid.FirebaseInstanceId;
                              ^
  symbol:   class FirebaseInstanceId
  location: package com.google.firebase.iid
/Users/emrecanozkok/Documents/workspace/projects/react-native-a11/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:40: error: cannot find symbol
import com.google.firebase.iid.InstanceIdResult;
                              ^
  symbol:   class InstanceIdResult
  location: package com.google.firebase.iid
/Users/emrecanozkok/Documents/workspace/projects/react-native-a11/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:143: error: cannot find symbol
              .addOnCompleteListener(new OnCompleteListener<InstanceIdResult>() {
                                                            ^
  symbol:   class InstanceIdResult
  location: class RNPushNotification
/Users/emrecanozkok/Documents/workspace/projects/react-native-a11/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:145: error: cannot find symbol
                  public void onComplete(@NonNull Task<InstanceIdResult> task) {
                                                       ^
  symbol: class InstanceIdResult
/Users/emrecanozkok/Documents/workspace/projects/react-native-a11/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:142: error: cannot find symbol
      FirebaseInstanceId.getInstance().getInstanceId()
      ^
  symbol:   variable FirebaseInstanceId
  location: class RNPushNotification
/Users/emrecanozkok/Documents/workspace/projects/react-native-a11/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:289: error: cannot find symbol
                  FirebaseInstanceId.getInstance().deleteInstanceId();
                  ^
  symbol: variable FirebaseInstanceId
Note: /Users/emrecanozkok/Documents/workspace/projects/react-native-a11/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationHelper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/emrecanozkok/Documents/workspace/projects/react-native-a11/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

@iamamar11

This comment has been minimized.

@emrecanozkok

This comment has been minimized.

@iamamar11

This comment has been minimized.

@emrecanozkok

This comment has been minimized.

@iamamar11

This comment has been minimized.

@mir1198yusuf

This comment has been minimized.

@Lucasdsk

This comment has been minimized.

@iamamar11

This comment has been minimized.

@ThuThuAung

This comment has been minimized.

@co2nut

This comment has been minimized.

@kaneki666
Copy link

i am getting the same error suddenly

@Dallas62 Dallas62 pinned this issue May 12, 2021
@Dallas62
Copy link
Collaborator

Hi,
I'm looking into this issue and will provide a fix soon.
Regards

@VihagaYohan

This comment has been minimized.

@Dallas62
Copy link
Collaborator

Fixing the version of a dependency is a temporary fix ⚠️

@hasithaWalpola

This comment has been minimized.

@yasir-syed
Copy link

yasir-syed commented May 12, 2021

Fixing the version of a dependency is a temporary fix ⚠️

@Dallas62 then what is the permanent fix?

@Dallas62
Copy link
Collaborator

Fixing the version of a dependency is a temporary fix ⚠️

@Dallas62 then what is the permanent fix?

#1979 (comment)

@juceda
Copy link

juceda commented May 12, 2021

Hi,
I'm looking into this issue and will provide a fix soon.
Regards

FYI: https://stackoverflow.com/questions/51125169/what-to-use-now-that-firebaseinstanceid-getinstance-gettoken-is-deprecated#answer-51125384

@ballooncross
Copy link

The same exact issue here, tried the whole day thought it is my new package added with conflicts before failed building with master branch.

@hiriski
Copy link

hiriski commented May 12, 2021

I have same problem. I tried upgrading to the

"react-native-push-notification": "^7.3.0"

it works fine for me, the error no longer appears.

@Biciato
Copy link

Biciato commented May 12, 2021

upgrading to 7.3.0 solves for me too.

@MrAngelos6
Copy link

I have a new error after upgrading to 7.3.0
Duplicate class com.google.android.gms.internal.firebase_messaging.zza found in modules jetified-firebase-iid-20.1.5-runtime.jar (com.google.firebase:firebase-iid:20.1.5) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)

@tastafur
Copy link

tastafur commented May 12, 2021

This is android/build.gradle @Dallas62 i am using
"@react-native-firebase/analytics": "^11.1.0",
"@react-native-firebase/app": "^11.1.0",
"@react-native-firebase/messaging": "^11.1.0",

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        buildToolsVersion = "29.0.2"
        minSdkVersion = 21
        compileSdkVersion = 29
        targetSdkVersion = 29
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:3.5.4")
        classpath 'com.google.gms:google-services:4.3.3'
        classpath 'com.bugsnag:bugsnag-android-gradle-plugin:5.+'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

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

        google()
        jcenter()
        maven { url 'https://www.jitpack.io' }
    }
}

and this is android/app/build.gradle

apply plugin: "com.android.application"
apply plugin: 'com.google.gms.google-services'

import com.android.build.OutputFile

/**
 * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
 * and bundleReleaseJsAndAssets).
 * These basically call `react-native bundle` with the correct arguments during the Android build
 * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
 * bundle directly from the development server. Below you can see all the possible configurations
 * and their defaults. If you decide to add a configuration block, make sure to add it before the
 * `apply from: "../../node_modules/react-native/react.gradle"` line.
 *
 * project.ext.react = [
 *   // the name of the generated asset file containing your JS bundle
 *   bundleAssetName: "index.android.bundle",
 *
 *   // the entry file for bundle generation. If none specified and
 *   // "index.android.js" exists, it will be used. Otherwise "index.js" is
 *   // default. Can be overridden with ENTRY_FILE environment variable.
 *   entryFile: "index.android.js",
 *
 *   // https://reactnative.dev/docs/performance#enable-the-ram-format
 *   bundleCommand: "ram-bundle",
 *
 *   // whether to bundle JS and assets in debug mode
 *   bundleInDebug: false,
 *
 *   // whether to bundle JS and assets in release mode
 *   bundleInRelease: true,
 *
 *   // whether to bundle JS and assets in another build variant (if configured).
 *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
 *   // The configuration property can be in the following formats
 *   //         'bundleIn${productFlavor}${buildType}'
 *   //         'bundleIn${buildType}'
 *   // bundleInFreeDebug: true,
 *   // bundleInPaidRelease: true,
 *   // bundleInBeta: true,
 *
 *   // whether to disable dev mode in custom build variants (by default only disabled in release)
 *   // for example: to disable dev mode in the staging build type (if configured)
 *   devDisabledInStaging: true,
 *   // The configuration property can be in the following formats
 *   //         'devDisabledIn${productFlavor}${buildType}'
 *   //         'devDisabledIn${buildType}'
 *
 *   // the root of your project, i.e. where "package.json" lives
 *   root: "../../",
 *
 *   // where to put the JS bundle asset in debug mode
 *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
 *
 *   // where to put the JS bundle asset in release mode
 *   jsBundleDirRelease: "$buildDir/intermediates/assets/release",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in debug mode
 *   resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in release mode
 *   resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
 *
 *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means
 *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
 *   // date; if you have any other folders that you want to ignore for performance reasons (gradle
 *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
 *   // for example, you might want to remove it from here.
 *   inputExcludes: ["android/**", "ios/**"],
 *
 *   // override which node gets called and with what additional arguments
 *   nodeExecutableAndArgs: ["node"],
 *
 *   // supply additional arguments to the packager
 *   extraPackagerArgs: []
 * ]
 */

project.ext.react = [
    enableHermes: false,  // clean and rebuild if changing
]

apply from: "../../node_modules/react-native/react.gradle"
apply plugin: "com.bugsnag.android.gradle"

/**
 * Set this to true to create two separate APKs instead of one:
 *   - An APK that only works on ARM devices
 *   - An APK that only works on x86 devices
 * The advantage is the size of the APK is reduced by about 4MB.
 * Upload all the APKs to the Play Store and people will download
 * the correct one based on the CPU architecture of their device.
 */
def enableSeparateBuildPerCPUArchitecture = false

/**
 * Run Proguard to shrink the Java bytecode in release builds.
 */
def enableProguardInReleaseBuilds = false

/**
 * The preferred build flavor of JavaScriptCore.
 *
 * For example, to use the international variant, you can use:
 * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
 *
 * The international variant includes ICU i18n library and necessary data
 * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
 * give correct results when using with locales other than en-US.  Note that
 * this variant is about 6MiB larger per architecture than default.
 */
def jscFlavor = 'org.webkit:android-jsc:+'

/**
 * Whether to enable the Hermes VM.
 *
 * This should be set on project.ext.react and mirrored here.  If it is not set
 * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
 * and the benefits of using Hermes will therefore be sharply reduced.
 */
def enableHermes = project.ext.react.get("enableHermes", false);

android {
    compileSdkVersion rootProject.ext.compileSdkVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        applicationId "com.dogoodpeople"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
        if (rootProject.hasProperty('VERSION_CODE')) {
            versionCode VERSION_CODE.toInteger()
        } else {
            versionCode 1000
        }
        if (rootProject.hasProperty('VERSION')) {
            versionName VERSION
        } else {
            versionName "1.0.0"
        }
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
        }
    }
    flavorDimensions "main"
    productFlavors {
        dotipps {
          dimension "main"
          applicationId  "com.dogoodpeople.dotipps"
        }
        dogood {
          dimension "main"
          applicationId  "com.dogoodpeople.app"
        }
    }
    signingConfigs {
        debug {
            storeFile file('debug.keystore')
            storePassword 'android'
            keyAlias 'androiddebugkey'
            keyPassword 'android'
        }
        release {
            if (project.hasProperty('ANDROID_RELEASE_STORE_FILE')) {
                storeFile file(ANDROID_RELEASE_STORE_FILE)
                storePassword ANDROID_RELEASE_STORE_PASSWORD
                keyAlias ANDROID_RELEASE_KEY_ALIAS
                keyPassword ANDROID_RELEASE_KEY_PASSWORD
            }
        }
    }
    buildTypes {
        debug {
            signingConfig signingConfigs.debug
        }
        release {
            // Caution! In production, you need to generate your own keystore file.
            // see https://reactnative.dev/docs/signed-apk-android.
            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:
            // https://developer.android.com/studio/build/configure-apk-splits.html
            def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
            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 {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules

    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"

    // If your app supports Android versions before Ice Cream Sandwich (API level 14)
    implementation 'com.facebook.fresco:animated-base-support:1.3.0'

    // For animated GIF support
    implementation 'com.facebook.fresco:animated-gif:2.0.0'

    // For WebP support, including animated WebP
    implementation 'com.facebook.fresco:animated-webp:2.1.0'
    implementation 'com.facebook.fresco:webpsupport:2.0.0'

    // For WebP support, without animations
    implementation 'com.facebook.fresco:webpsupport:2.0.0'

    implementation project(":reactnativekeyboardinput")

    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
      exclude group:'com.facebook.fbjni'
    }

    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
        exclude group:'com.squareup.okhttp3', module:'okhttp'
    }

    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
    }

    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
    def multidex_version = "2.0.1"
    implementation "androidx.multidex:multidex:$multidex_version"
}

// 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 from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

bugsnag {
  uploadReactNativeMappings = true
}


@dan-lee
Copy link

dan-lee commented May 12, 2021

@MrAngelos6 maybe you have the same issue as we did: #1979 (comment)

@lalit-tsa
Copy link

Screenshot (187)

@Dallas62
Copy link
Collaborator

Dallas62 commented May 12, 2021

@tastafur

This is android/build.gradle @Dallas62 i am using
"@react-native-firebase/analytics": "^11.1.0",
"@react-native-firebase/app": "^11.1.0",
"@react-native-firebase/messaging": "^11.1.0",

From your log, it looks like the issue is related to io.invertase.firebase.messaging.ReactNativeFirebaseMessagingModule
Consider upgrade your version of RNFirebase to the latest and open an issue to this library if the issue still occure.

https://github.com/invertase/react-native-firebase
invertase/react-native-firebase#5293

@Dallas62
Copy link
Collaborator

@lalit-tsa A screenshot will not help. I see many deprecated warning message. Consider upgrade your dependencies and provide a Gradle file.

@DennisOstertag
Copy link

Thanks for the quick update of the lib.
I got the same problem as @dan-lee.

Android/app/build.gradle

apply plugin: "com.android.application"

import com.android.build.OutputFile

/**
 * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
 * and bundleReleaseJsAndAssets).
 * These basically call `react-native bundle` with the correct arguments during the Android build
 * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
 * bundle directly from the development server. Below you can see all the possible configurations
 * and their defaults. If you decide to add a configuration block, make sure to add it before the
 * `apply from: "../../node_modules/react-native/react.gradle"` line.
 *
 * project.ext.react = [
 *   // the name of the generated asset file containing your JS bundle
 *   bundleAssetName: "index.android.bundle",
 *
 *   // the entry file for bundle generation
 *   entryFile: "index.android.js",
 *
 *   // whether to bundle JS and assets in debug mode
 *   bundleInDebug: false,
 *
 *   // whether to bundle JS and assets in release mode
 *   bundleInRelease: true,
 *
 *   // whether to bundle JS and assets in another build variant (if configured).
 *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
 *   // The configuration property can be in the following formats
 *   //         'bundleIn${productFlavor}${buildType}'
 *   //         'bundleIn${buildType}'
 *   // bundleInFreeDebug: true,
 *   // bundleInPaidRelease: true,
 *   // bundleInBeta: true,
 *
 *   // whether to disable dev mode in custom build variants (by default only disabled in release)
 *   // for example: to disable dev mode in the staging build type (if configured)
 *   devDisabledInStaging: true,
 *   // The configuration property can be in the following formats
 *   //         'devDisabledIn${productFlavor}${buildType}'
 *   //         'devDisabledIn${buildType}'
 *
 *   // the root of your project, i.e. where "package.json" lives
 *   root: "../../",
 *
 *   // where to put the JS bundle asset in debug mode
 *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
 *
 *   // where to put the JS bundle asset in release mode
 *   jsBundleDirRelease: "$buildDir/intermediates/assets/release",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in debug mode
 *   resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in release mode
 *   resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
 *
 *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means
 *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
 *   // date; if you have any other folders that you want to ignore for performance reasons (gradle
 *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
 *   // for example, you might want to remove it from here.
 *   inputExcludes: ["android/**", "ios/**"],
 *
 *   // override which node gets called and with what additional arguments
 *   nodeExecutableAndArgs: ["node"],
 *
 *   // supply additional arguments to the packager
 *   extraPackagerArgs: []
 * ]
 */

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

// apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
apply from: "../../node_modules/react-native/react.gradle"

// add firebase
apply plugin: 'com.google.gms.google-services'

/**
 * Set this to true to create two separate APKs instead of one:
 *   - An APK that only works on ARM devices
 *   - An APK that only works on x86 devices
 * The advantage is the size of the APK is reduced by about 4MB.
 * Upload all the APKs to the Play Store and people will download
 * the correct one based on the CPU architecture of their device.
 */
def enableSeparateBuildPerCPUArchitecture = false

/**
 * Run Proguard to shrink the Java bytecode in release builds.
 */
def enableProguardInReleaseBuilds = false

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

    defaultConfig {
        applicationId "<id>"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
        manifestPlaceholders = [
            'appAuthRedirectScheme': '<scheme>'
        ]
        //missingDimensionStrategy 'react-native-camera', 'general'
        missingDimensionStrategy 'react-native-camera', 'mlkit'
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
        }
    }
    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, "arm64-v8a": 3, "x86_64": 4]
            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
            }
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

def jscFlavor = 'org.webkit:android-jsc:+'

def enableHermes = project.ext.react.get("enableHermes", false);

dependencies {
    implementation project(':react-native-geolocation-service')
    implementation project(':appcenter-crashes')
    implementation project(':appcenter-analytics')
    implementation project(':appcenter')
    implementation project(':react-native-camera')
    implementation project(':react-native-linear-gradient')
    implementation project(':react-native-vector-icons')
    implementation project(':react-native-webview')
    implementation project(':react-native-app-auth')
    implementation project(':react-native-svg')
    implementation project(':react-native-safe-area-context')
    implementation project(':@react-native-community_async-storage')
    implementation project(':react-native-permissions')
    implementation project(':react-native-reanimated')
    implementation project(':react-native-device-info')
    implementation project(':react-native-system-setting')
    implementation project(':react-native-push-notification')

    implementation project(':react-native-gesture-handler')
    implementation project(':react-native-maps')
    implementation project(path: ':@react-native-picker_picker')

    compile project(':react-native-emarsys-wrapper')

    implementation "com.emarsys:emarsys-sdk:2.5.4"

    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
    implementation "com.facebook.react:react-native:+"
    implementation project(path: ':react-native-splash-screen')
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'// From node_modules
    // addUnimodulesDependencies()
    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
}

// 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 from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle");
// applyNativeModulesAppBuildGradle(project)

This is my android/build.gradle.

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        buildToolsVersion = "29.0.2"
        minSdkVersion = 23
        compileSdkVersion = 29
        targetSdkVersion = 28
        supportLibVersion = "28.0.0"
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.google.gms:google-services:4.3.1'
        classpath 'com.android.tools.build:gradle:4.0.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"
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

    }
}


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

Thanks for the quick release, I cleared my cache with cd android && ./gradlew clean still I get the following error:

* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
  java.lang.RuntimeException: Duplicate class com.google.android.gms.internal.firebase_messaging.zza found in modules jetified-firebase-iid-16.0.0-runtime.jar (com.google.firebase:firebase-iid:16.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
  Duplicate class com.google.android.gms.internal.firebase_messaging.zzb found in modules jetified-firebase-iid-16.0.0-runtime.jar (com.google.firebase:firebase-iid:16.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
  Duplicate class com.google.android.gms.internal.firebase_messaging.zzc found in modules jetified-firebase-iid-16.0.0-runtime.jar (com.google.firebase:firebase-iid:16.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
  Duplicate class com.google.android.gms.internal.firebase_messaging.zzd found in modules jetified-firebase-iid-16.0.0-runtime.jar (com.google.firebase:firebase-iid:16.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
  Duplicate class com.google.android.gms.internal.firebase_messaging.zze found in modules jetified-firebase-iid-16.0.0-runtime.jar (com.google.firebase:firebase-iid:16.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
  Duplicate class com.google.android.gms.internal.firebase_messaging.zzf found in modules jetified-firebase-iid-16.0.0-runtime.jar (com.google.firebase:firebase-iid:16.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
  Duplicate class com.google.android.gms.internal.firebase_messaging.zzg found in modules jetified-firebase-iid-16.0.0-runtime.jar (com.google.firebase:firebase-iid:16.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
  Duplicate class com.google.android.gms.internal.firebase_messaging.zzh found in modules jetified-firebase-iid-16.0.0-runtime.jar (com.google.firebase:firebase-iid:16.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
  Duplicate class com.google.android.gms.internal.firebase_messaging.zzi found in modules jetified-firebase-iid-16.0.0-runtime.jar (com.google.firebase:firebase-iid:16.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
  Duplicate class com.google.android.gms.internal.firebase_messaging.zzj found in modules jetified-firebase-iid-16.0.0-runtime.jar (com.google.firebase:firebase-iid:16.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
  Duplicate class com.google.android.gms.internal.firebase_messaging.zzk found in modules jetified-firebase-iid-16.0.0-runtime.jar (com.google.firebase:firebase-iid:16.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
  Duplicate class com.google.android.gms.internal.firebase_messaging.zzl found in modules jetified-firebase-iid-16.0.0-runtime.jar (com.google.firebase:firebase-iid:16.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
  Duplicate class com.google.android.gms.internal.firebase_messaging.zzm found in modules jetified-firebase-iid-16.0.0-runtime.jar (com.google.firebase:firebase-iid:16.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
  Duplicate class com.google.firebase.iid.FirebaseInstanceIdReceiver found in modules jetified-firebase-iid-16.0.0-runtime.jar (com.google.firebase:firebase-iid:16.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)

  Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.

@shaileshbinary
Copy link

All Trace

/Users/emrecanozkok/Documents/workspace/projects/react-native-a11/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:39: error: cannot find symbol
import com.google.firebase.iid.FirebaseInstanceId;
                              ^
  symbol:   class FirebaseInstanceId
  location: package com.google.firebase.iid
/Users/emrecanozkok/Documents/workspace/projects/react-native-a11/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:40: error: cannot find symbol
import com.google.firebase.iid.InstanceIdResult;
                              ^
  symbol:   class InstanceIdResult
  location: package com.google.firebase.iid
/Users/emrecanozkok/Documents/workspace/projects/react-native-a11/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:143: error: cannot find symbol
              .addOnCompleteListener(new OnCompleteListener<InstanceIdResult>() {
                                                            ^
  symbol:   class InstanceIdResult
  location: class RNPushNotification
/Users/emrecanozkok/Documents/workspace/projects/react-native-a11/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:145: error: cannot find symbol
                  public void onComplete(@NonNull Task<InstanceIdResult> task) {
                                                       ^
  symbol: class InstanceIdResult
/Users/emrecanozkok/Documents/workspace/projects/react-native-a11/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:142: error: cannot find symbol
      FirebaseInstanceId.getInstance().getInstanceId()
      ^
  symbol:   variable FirebaseInstanceId
  location: class RNPushNotification
/Users/emrecanozkok/Documents/workspace/projects/react-native-a11/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:289: error: cannot find symbol
                  FirebaseInstanceId.getInstance().deleteInstanceId();
                  ^
  symbol: variable FirebaseInstanceId
Note: /Users/emrecanozkok/Documents/workspace/projects/react-native-a11/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationHelper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/emrecanozkok/Documents/workspace/projects/react-native-a11/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Please try it install latest library npm i react-native-push-notification@latest
i update library then working fine

@Dallas62
Copy link
Collaborator

Dallas62 commented May 12, 2021

@Priiyam Get stuck in old version will cause more dommages to your apps since there is a big issue in old version which exclude all recent Android device. It's not so difficult to create and use a channel.

@VladyslavLypovets
Copy link

@Dallas62 Are you have some solution for the problem?

@TalkyEk
Copy link

TalkyEk commented May 12, 2021

@Dallas62 I have the same issue as @MrAngelos6
Could you help with this one?

Task :app:checkDebugDuplicateClasses FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings
622 actionable tasks: 119 executed, 503 up-to-date

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:checkDebugDuplicateClasses'.
    1 exception was raised by workers:
    java.lang.RuntimeException: Duplicate class com.google.android.gms.internal.firebase_messaging.zza found in modules firebase-iid-19.0.0-runtime.jar (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
    Duplicate class com.google.android.gms.internal.firebase_messaging.zzb found in modules firebase-iid-19.0.0-runtime.jar (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
    Duplicate class com.google.android.gms.internal.firebase_messaging.zzc found in modules firebase-iid-19.0.0-runtime.jar (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
    Duplicate class com.google.android.gms.internal.firebase_messaging.zzd found in modules firebase-iid-19.0.0-runtime.jar (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
    Duplicate class com.google.android.gms.internal.firebase_messaging.zze found in modules firebase-iid-19.0.0-runtime.jar (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
    Duplicate class com.google.android.gms.internal.firebase_messaging.zzf found in modules firebase-iid-19.0.0-runtime.jar (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
    Duplicate class com.google.android.gms.internal.firebase_messaging.zzh found in modules firebase-iid-19.0.0-runtime.jar (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
    Duplicate class com.google.android.gms.internal.firebase_messaging.zzm found in modules firebase-iid-19.0.0-runtime.jar (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
    Duplicate class com.google.android.gms.internal.firebase_messaging.zzn found in modules firebase-iid-19.0.0-runtime.jar (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
    Duplicate class com.google.android.gms.internal.firebase_messaging.zzo found in modules firebase-iid-19.0.0-runtime.jar (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
    Duplicate class com.google.android.gms.internal.firebase_messaging.zzp found in modules firebase-iid-19.0.0-runtime.jar (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
    Duplicate class com.google.android.gms.internal.firebase_messaging.zzq found in modules firebase-iid-19.0.0-runtime.jar (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
    Duplicate class com.google.android.gms.internal.firebase_messaging.zzr found in modules firebase-iid-19.0.0-runtime.jar (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
    Duplicate class com.google.firebase.iid.FirebaseInstanceIdReceiver found in modules firebase-iid-19.0.0-runtime.jar (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)

@Dallas62
Copy link
Collaborator

@VladyslavLypovets

@Dallas62 Are you have some solution for the problem?

Which problem, a release is available.

@Dallas62
Copy link
Collaborator

Dallas62 commented May 12, 2021

@TalkyEk
Copy link

TalkyEk commented May 12, 2021

@Dallas62 unfortunately doesn't work for me

@Dallas62
Copy link
Collaborator

@TalkyEk Since this is a duplicate classes, you have a dependency in your Gradle File which is wrong, can't help more with information provided.

@TalkyEk
Copy link

TalkyEk commented May 12, 2021

@Dallas62 thanks for help

@sharpcodepro
Copy link

I have a new error after upgrading to 7.3.0
Duplicate class com.google.android.gms.internal.firebase_messaging.zza found in modules jetified-firebase-iid-20.1.5-runtime.jar (com.google.firebase:firebase-iid:20.1.5) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)

Getting the same, meh :(

@dotansimha
Copy link

@TalkyEk Since this is a duplicate classes, you have a dependency in your Gradle File which is wrong, can't help more with information provided.

Please note my comment in #1979 (comment)
If firebase-messaging is resolved to v22, you also get an error regarding duplicate classes, which seems to be the incorrect symptom.

@DennisOstertag
Copy link

@TalkyEk Since this is a duplicate classes, you have a dependency in your Gradle File which is wrong, can't help more with information provided.

Please note my comment in #1979 (comment)
If firebase-messaging is resolved to v22, you also get an error regarding duplicate classes, which seems to be the incorrect symptom.

thanks a lot. this fixed it for me

Repository owner deleted a comment from killianfalle97 May 12, 2021
@bhanu2795
Copy link

@Dallas62 after upgrading it to 7.3.0 it worked for me the apk is created but as soon as the app is launched it get crashed below is the logcat screen shot
Screenshot 2021-05-12 at 6 28 40 PM

@DivWal
Copy link

DivWal commented May 12, 2021

Task :app:checkDebugDuplicateClasses FAILED
ReactNativeFirebase WARNING: NPM package '@react-native-firebase/ml-vision' depends on '@react-native-firebase/app' v8.3.1 but found v7.0.1, this might cause build issues or runtime crashes.

I updated the push-notification version @7.3.0.
Cannot try to pin messaging version, in android/build.gradle as i m using google-service not firebaseMessagingVersion.

Can anyone help me out with this ?

@yasir-syed
Copy link

upgraded to 7.3.0 build is successful but app keeps on crashing on start up, no other changes made,

Repository owner locked and limited conversation to collaborators May 12, 2021
@Dallas62

This comment has been minimized.

Repository owner deleted a comment from dotansimha May 12, 2021
@Dallas62
Copy link
Collaborator

A new version 7.3.1 is available to make you save time on the current issue (and side-effect).
Maintainers are welcome ! contact me if interested in 😉

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

No branches or pull requests