andrehtissot / cordova-plugin-fcm-with-dependecy-updated

Google FCM Push Notifications Cordova Plugin
MIT License
210 stars 272 forks source link

error: cannot find symbol [cordova] import com.google.firebase.iid.FirebaseInstanceId; #274

Open erick1979 opened 2 years ago

erick1979 commented 2 years ago

Don't build for android after install plugin: ionic cordova run android --livereload --console

ERROR:

platforms/android/app/src/main/java/com/gae/scaffolder/plugin/FCMPlugin.java:11: error: cannot find symbol [cordova] import com.google.firebase.iid.FirebaseInstanceId; [cordova] ^ [cordova] symbol: class FirebaseInstanceId [cordova] location: package com.google.firebase.iid


Gradle 7.2

Build time: 2021-08-17 09:59:03 UTC Revision: a773786b58bb28710e3dc96c4d1a7063628952ad

Kotlin: 1.5.21 Groovy: 3.0.8 Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020 JVM: 16.0.2 (Homebrew 16.0.2+0) OS: Mac OS X 10.15.6 x86_64 Catalina Cordova CLI version (cordova --version): 10.0.0

Package.json { "name": "Aplicativo", "version": "1.0.5", "author": "Aplicativo", "homepage": "https://www.aplicativo.com/", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/common": "~8.1.2", "@angular/core": "~8.1.2", "@angular/forms": "~8.1.2", "@angular/platform-browser": "~8.1.2", "@angular/platform-browser-dynamic": "~8.1.2", "@angular/router": "~8.1.2", "@auth0/angular-jwt": "^3.0.1", "@fortawesome/angular-fontawesome": "^0.5.0", "@fortawesome/fontawesome-svg-core": "^1.2.26", "@fortawesome/free-solid-svg-icons": "^5.12.0", "@ionic-native/call-number": "^5.19.1", "@ionic-native/clipboard": "^5.31.1", "@ionic-native/core": "^5.19.1", "@ionic-native/fcm": "^4.20.0", "@ionic-native/firebase-analytics": "^5.36.0", "@ionic-native/firebase-messaging": "^5.36.0", "@ionic-native/geolocation": "^5.19.1", "@ionic-native/in-app-browser": "^5.34.0", "@ionic-native/launch-navigator": "^5.19.1", "@ionic-native/network": "^5.21.5", "@ionic-native/push": "^4.20.0", "@ionic-native/splash-screen": "^5.19.1", "@ionic-native/status-bar": "^5.19.1", "@ionic/angular": "^4.7.1", "balloon-css": "^1.0.4", "call-number": "^1.0.1", "cordova-android": "9.1.0", "cordova-clipboard": "1.3.0", "cordova-plugin-actionsheet": "^2.3.3", "cordova-plugin-dialogs": "^2.0.2", "cordova-plugin-geolocation": "^4.0.2", "cordova-plugin-inappbrowser": "^4.1.0", "cordova-plugin-network-information": "^2.0.2", "core-js": "^2.5.4", "hammerjs": "^2.0.8", "moment": "^2.24.0", "rxjs": "~6.5.1", "rxjs-compat": "^6.6.7", "tslib": "^1.9.0", "uk.co.workingedge.phonegap.plugin.launchnavigator": "^5.0.4", "zone.js": "~0.9.1" }, "devDependencies": { "@angular-devkit/architect": "~0.801.2", "@angular-devkit/build-angular": "~0.801.2", "@angular-devkit/core": "~8.1.2", "@angular-devkit/schematics": "~8.1.2", "@angular/cli": "~8.1.2", "@angular/compiler": "~8.1.2", "@angular/compiler-cli": "~8.1.2", "@angular/language-service": "~8.1.2", "@ionic/angular-toolkit": "^2.1.1", "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", "codelyzer": "^5.0.0", "cordova-ios": "^6.2.0", "cordova-plugin-device": "^2.0.3", "cordova-plugin-fcm-with-dependecy-updated": "^7.4.0", "cordova-plugin-firebase-analytics": "^6.0.1", "cordova-plugin-firebase-messaging": "^6.0.0", "cordova-plugin-ionic-keyboard": "^2.2.0", "cordova-plugin-ionic-webview": "^5.0.0", "cordova-plugin-splashscreen": "^5.0.3", "cordova-plugin-statusbar": "^2.4.3", "cordova-plugin-whitelist": "^1.3.4", "cordova-support-android-plugin": "^1.0.2", "jasmine-core": "~3.4.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~4.1.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.0.1", "karma-jasmine": "~2.0.1", "karma-jasmine-html-reporter": "^1.4.0", "protractor": "~5.4.0", "ts-node": "~7.0.0", "tslint": "~5.15.0", "typescript": "~3.4.3" }, "description": "Aplicativo para visualização de frota.", "cordova": { "plugins": { "cordova-plugin-whitelist": {}, "cordova-plugin-statusbar": {}, "cordova-plugin-device": {}, "cordova-plugin-splashscreen": {}, "cordova-plugin-ionic-keyboard": {}, "cordova-plugin-geolocation": {}, "uk.co.workingedge.phonegap.plugin.launchnavigator": { "GOOGLE_API_KEY_FOR_ANDROID": "", "LOCATION_USAGE_DESCRIPTION": "This app requires access to your location for navigation purposes", "OKHTTP_VERSION": "3.12.0" }, "call-number": {}, "cordova-plugin-network-information": {}, "cordova-clipboard": {}, "cordova-plugin-inappbrowser": {}, "cordova-plugin-firebase-messaging": {}, "cordova-plugin-firebase-analytics": {}, "cordova-plugin-ionic-webview": {}, "cordova-plugin-fcm-with-dependecy-updated": { "ANDROID_DEFAULT_NOTIFICATION_ICON": "@mipmap/ic_launcher", "ANDROID_FIREBASE_BOM_VERSION": "28.3.1", "ANDROID_GOOGLE_SERVICES_VERSION": "4.3.4", "ANDROID_GRADLE_TOOLS_VERSION": "4.1.0", "IOS_FIREBASE_MESSAGING_VERSION": "~> 7.4.0" } }, "platforms": [ "ios", "android" ] } }

nagthgr8 commented 1 year ago

Are you able to find a fix, I am experiencing the same with Gradle 7.3 as well, there are some workarounds here but I think there could be some reliable one

nagthgr8 commented 1 year ago

I could able to fix this by downgrading the plugin

cordova plugin rm cordova-plugin-fcm-with-dependecy-updated cordova plugin add cordova-plugin-fcm-with-dependecy-updated@7.0.8