Search code examples
iosfluttercocoapods

CocoaPods could not find compatible versions for pod "GoogleAppMeasurement"


I am trying to build an IOS but i am getting error about the compatible versions for pod. I have already tried many threads but not able to resolve the issue. My Android version is working fine.

Below is the error message got when i did pod update or pod install

Analyzing dependencies
firebase_analytics: Using Firebase SDK version '9.3.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '9.3.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '9.3.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "GoogleAppMeasurement":
  In Podfile:
    firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`) was resolved to 9.3.0, which depends on
      Firebase/Analytics (= 9.3.0) was resolved to 9.3.0, which depends on
        Firebase/Core (= 9.3.0) was resolved to 9.3.0, which depends on
          FirebaseAnalytics (~> 9.3.0) was resolved to 9.3.0, which depends on
            FirebaseAnalytics/AdIdSupport (= 9.3.0) was resolved to 9.3.0, which depends on
              GoogleAppMeasurement (= 9.3.0)

    google_mobile_ads (from `.symlinks/plugins/google_mobile_ads/ios`) was resolved to 0.0.1, which depends on
      Google-Mobile-Ads-SDK (= 8.13.0) was resolved to 8.13.0, which depends on
        GoogleAppMeasurement (< 9.0, >= 7.0)

Below is the error when i tried flutter run

 CDN: trunk Relative path: Specs/e/3/b/GoogleAppMeasurement/7.0.0/GoogleAppMeasurement.podspec.json exists! Returning
      local because checking is only performed in repo update
    [!] CocoaPods could not find compatible versions for pod "GoogleAppMeasurement":
      In Podfile:
        firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`) was resolved to 9.3.0, which depends on
          Firebase/Analytics (= 9.3.0) was resolved to 9.3.0, which depends on
            Firebase/Core (= 9.3.0) was resolved to 9.3.0, which depends on
              FirebaseAnalytics (~> 9.3.0) was resolved to 9.3.0, which depends on
                FirebaseAnalytics/AdIdSupport (= 9.3.0) was resolved to 9.3.0, which depends on
                  GoogleAppMeasurement (= 9.3.0)

        google_mobile_ads (from `.symlinks/plugins/google_mobile_ads/ios`) was resolved to 0.0.1, which depends on
          Google-Mobile-Ads-SDK (= 8.13.0) was resolved to 8.13.0, which depends on
            GoogleAppMeasurement (< 9.0, >= 7.0)

pubspec.yaml

name: app
description: A new Flutter project.


publish_to: 'none' # Remove this line if you wish to publish to pub.dev


version: 1.7.1+9

environment:
  sdk: '>=2.12.0 <3.0.0'

dependencies:
  flutter:
    sdk: flutter

  cached_network_image: ^3.2.1
  cupertino_icons: ^1.0.3
  dots_indicator: ^2.0.0
  google_fonts: ^3.0.1
  hive: ^2.2.1
  hive_flutter: ^1.1.0
  html_unescape: ^2.0.0
  http: ^0.13.3
  jiffy: ^5.0.0
  path_provider: ^2.0.10
  provider: ^6.0.3
  shared_preferences: ^2.0.15
  skeleton_text: ^3.0.0
  timeago: ^3.1.0
  firebase_core: ^1.17.1
  firebase_messaging: ^11.4.1
  rounded_loading_button: ^2.1.0
  flutter_svg: ^0.23.0+1
  url_launcher: ^6.1.2
  share: ^2.0.4
  launch_review: ^3.0.1
  package_info: ^2.0.2
  easy_localization: ^3.0.1
  animated_bottom_navigation_bar: ^0.3.3
  flutter_web_browser: ^0.17.1
  flare_flutter: ^3.0.2
  fluttertoast: ^8.0.8
  google_mobile_ads: ^1.2.0
  loading_indicator: ^3.1.0
  flutter_html: ^2.2.1
  firebase_analytics: ^9.1.9
  youtube_player_iframe: ^2.3.0
  webview_flutter: ^2.0.4
  flutter_icons:
    git:
      url: https://github.com/adarsh-technocrat/flutter-icons
  md2_tab_indicator:
    git:
      url: https://github.com/westdabestdb/md2_tab_indicator
  better_player:
    git:
      url: https://github.com/shiyiya/betterplayer.git
  


dev_dependencies:
  flutter_test:
    sdk: flutter

  change_app_package_name: ^1.0.0
  flutter_launcher_icons: "^0.9.2"

flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/images/icon.png"

    

flutter:

  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
    - assets/images/
    - assets/translations/
    - assets/animation_files/

  fonts:

    - family: Manrope
      fonts:
        - asset: assets/fonts/Manrope-Light.ttf
          weight: 300
        - asset: assets/fonts/Manrope-Regular.ttf
          weight: 400
        - asset: assets/fonts/Manrope-Medium.ttf
          weight: 500
        - asset: assets/fonts/Manrope-SemiBold.ttf
          weight: 600
        - asset: assets/fonts/Manrope-Bold.ttf
          weight: 700
        - asset: assets/fonts/Manrope-ExtraBold.ttf
          weight: 800

    - family: Raleway
      fonts:
        - asset: assets/fonts/Raleway-Light.ttf
          weight: 400
        - asset: assets/fonts/Raleway-ExtraBold.ttf
          weight: 800


    - family: Open Sans
      fonts:
        - asset: assets/fonts/OpenSans-Light.ttf
          weight: 400
        - asset: assets/fonts/OpenSans-Regular.ttf
          weight: 500

can someone please help me how to proceed. Thanks in advance.


Solution

  • As per @Paul Beusterien updated the new version of the Google-Mobile-Ads-SDK.