analytics_flutter icon indicating copy to clipboard operation
analytics_flutter copied to clipboard

Build failed when adding segment_analytics_plugin_firebase on iOS/Android

Open officialkhairi opened this issue 1 year ago • 0 comments

I've added the plugin but build failes

on iOS :

segment_analytics_plugin_firebase

` Error showing:
Failed to build iOS app Error (Xcode): ../../.pub-cache/git/analytics_flutter-6dd36b60c867e7af2433cce3f5db13ae0a08f47e/packages/plugins/plugin_firebase/lib/plugin_firebase.dart:205:27: Error: The argument type 'Map<String, Object?>' can't be assigned to the parameter type 'Map<String, Object>?' because 'Object?' is nullable and 'Object' isn't. Could not build the application for the simulator. Error launching application on iPhone 16.

`

on Android :

`../../.pub-cache/git/analytics_flutter-6dd36b60c867e7af2433cce3f5db13ae0a08f47e/packages/plugins/plugin_firebase/lib/plugin_firebase.dart:205:27: Error: The argument type 'Map<String, Object?>' can't be assigned to the parameter type 'Map<String, Object>?' because 'Object?' is nullable and 'Object' isn't.

  • 'Map' is from 'dart:core'.
  • 'Object' is from 'dart:core'. parameters: castParameterType(properties)); ^ Target kernel_snapshot_program failed: Exception

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command '/Users/xkk/Documents/Dev/flutter/bin/flutter'' finished with non-zero exit value 1

  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 33s Error: Gradle task assembleDebug failed with exit code 1`

officialkhairi avatar Oct 28 '24 02:10 officialkhairi