we are using firebase analytics plugin . Everything works fine, but when we try to make an iOS build for distribution we get build error. Whereas, just removing the plugin we get build successful. What should be the recommended way for ionic 3.19.0 app wrapped on cordova 7 or 8 ?
Configuration ‘compile’ in project ‘:app’ is deprecated. Use ‘implementation’ instead.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_drpicextdm6z8hklacqmzhji5.run(/Users/itcinfotech/Documents/Ionic Project/onzv_release/project_name/platforms/android/app/build.gradle:146)
What went wrong:
A problem occurred evaluating project ‘:app’.
Failed to apply plugin [class ‘com.google.gms.googleservices.GoogleServicesPlugin’]
Cannot add extension with name ‘googleServices’, as there is an extension already registered with that name.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
What went wrong:
A problem occurred evaluating project ‘:app’.
Failed to apply plugin [class ‘com.google.gms.googleservices.GoogleServicesPlugin’]
Cannot add extension with name ‘googleServices’, as there is an extension already registered with that name.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED in 22s
at ChildProcess.whenDone (/Users/itcinfotech/Documents/Ionic Project/onzv_release/project_name/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Socket.stream.socket.on (internal/child_process.js:381:11)
at Socket.emit (events.js:182:13)
at Pipe._handle.close (net.js:606:12)
(node:6051) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either bythrowing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6051) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I am really stuck on this. please help. if there are other separate plugins which work for iOS and android separately, i am willing to experiment. But I can not remove firebase analytics plugin, as it is too much of work now
will this single plugin work for firebase push notification as well as firebase analytics ? I know if i remove the firebase analytics plugin this thing works, now i am thinking if this solves my problem of firebase analytics problem, i dont need to add 2 plugins to achieve these functionalities , right ?
any instructions how to use this, for firebase analytics, if at all it is there !
yes, we have added google-services.json file. without that our firebase analytics would not have worked ! the firebase analytics plugin works perfect, only when we add push notification plugin we start getting these weird errors.
now i get this
FAILURE: Build failed with an exception.
What went wrong:
The library com.google.android.gms:play-services-analytics-impl is being requested by various other libraries at [[16.0.1,16.0.1]], but resolves to 16.0.4. Disable the plugin and check yourdependencies tree using ./gradlew :app:dependencies.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED in 4s
at ChildProcess.whenDone (/Users/itcinfotech/Documents/Ionic Project/onzv_release/project_name/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
(node:5077) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5077) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
We managed to resolve android issue. We still get into duplicate symbol problems in Xcode. How to resolve this ?
With the amount of time it taking for resolving this issue, I am thinking of writing my own plugin, but how to disable this plugin for iOS ?
How did you fix this on Android? Having the same issue.
We are using “@ionic-native/firebase” for push and “@ionic-native/google-plus” for auth and it works fine. But build fails with the following error on adding “@ionic-native/firebase-analytics”:
What went wrong:
[cordova] A problem occurred evaluating project ‘:app’.
[cordova] > Failed to apply plugin [class ‘com.google.gms.googleservices.GoogleServicesPlugin’]
[cordova] > Cannot add extension with name ‘googleServices’, as there is an extension already registered with that name.
please use the generic plugin @ionic-native/firebase for both push and analytics.
@ionic-native/firebase-analytics is not required, we ended up removing this plugin. The firebase analytics logging calls syntax are a bit different for @ionic-native/firebase, once changed, both push and analytics worked using only one single plugin @ionic-native/firebase
Firebase Use
Firebase is Google’s mobile application development platform that helps you build, improve, and grow your app. Firebase is Google’s mobile application development platform that helps you build, improve, and grow your app.
Firebase and it works
Firebase Cloud Messaging (FCM) provides a reliable and battery-efficient connection between your server and devices that allows you to deliver and receive messages and notifications on iOS, Android, and the web at no cost. You can send notification messages (2KB limit) and data messages (4KB limit).
Firebase RealTime Database
Firebase RealTime Database with Operations in Android with Examples. Firebase Realtime Database is a Cloud-hosted database, i.e. it runs on a cloud and access to the user is provided as a service. It stores data in JSON (Javascript Object Notation) format, a format to store or transport data.
If you are in any business and you need some software or product that can help you in work remotely, test management, project management, progress reports of your projects and solving many other problems. So kindly check our tool and click on the following link:- Bug Tracking Software