0

after long time currently i am facing problem with my flutter project while using cloud_firestore plugin for realtime database on my app

Its showing error while compiling

all the dependencies are at latest version, can anyone resolve this issue so that i can complete the app using cloud_firestore ?

here is the complete log while trying to run the app

C:\Flutter\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-3.4.8\android\src\main\java\io\flutter\plugins\firebase\firestore\streamhandler\TransactionStreamHandler.java:13: error: cannot find symbol
import com.google.firebase.firestore.TransactionOptions;
                                    ^
  symbol:   class TransactionOptions
  location: package com.google.firebase.firestore
C:\Flutter\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-3.4.8\android\src\main\java\io\flutter\plugins\firebase\firestore\streamhandler\TransactionStreamHandler.java:66: error: package TransactionOptions does not exist
            new TransactionOptions.Builder().setMaxAttempts(maxAttempts).build(),
                                  ^
2 errors
         *********************************************************
WARNING: This version of flutter_webview_plugin will break your Android build if it or its dependencies aren't compatible with AndroidX.
         See **************** for more information on the problem and how to fix it.
         This warning prints for all Android build failures. The real root cause of the error may be unrelated.
         *********************************************************

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':cloud_firestore:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* 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 40s
Exception: Gradle task assembleDebug failed with exit code 1


My current dependencies in pubspec.yaml is

  open_filex: ^4.1.1
  sms_autofill: ^2.2.0
  firebase_auth: ^3.8.0
  youtube_player_flutter: ^8.1.0
  photo_view: ^0.14.0
  provider: ^6.0.3
  path_provider: ^2.0.11
  shared_preferences: ^2.0.15
  http: ^0.13.5
  get: ^4.6.5
  get_storage: ^2.0.3
  video_player: ^2.4.7
  flutter_svg: ^1.1.5
  firebase_messaging: ^13.0.1
  firebase_core: ^1.22.0
  cloud_firestore: ^3.4.8
  flutter_local_notifications: ^9.9.1
  connectivity_plus: ^2.3.7
  jaguar_jwt: ^3.0.0
  #stripe_payment: ^1.1.4
  flutter_stripe: ^5.0.0
  flutter_downloader: ^1.8.3+2
  klocalizations_flutter: ^0.0.8
  geocoding: ^2.0.5
  geolocator: ^9.0.1
  flutter_paystack:
    git:
      url: https://github.com/definitelyme/flutter_paystack.git
      ref: a4a33c3dd0a12f46d655a2e63d11e9f20ba82d01
  paytm: ^3.0.1
  razorpay_flutter: ^1.3.2
  file_picker: ^5.0.1
  permission_handler: ^10.0.0
  flutter_rating_bar: ^4.0.1
  shimmer: ^2.0.0
  tuple: ^2.0.0
  action_slider: ^0.6.0
  url_launcher: ^6.1.5
  version: ^3.0.2
  google_maps_flutter: ^2.2.0
  in_app_review: ^2.0.4
  share_plus: ^4.1.0
  flutter_html_to_pdf: ^0.7.0
  webview_flutter:
  firebase_dynamic_links: ^4.3.7
  flutter_html:
  flutter_webview_plugin: ^0.4.0
  speech_to_text: ^5.6.1
Mijanur Rahaman
  • 353
  • 1
  • 5
  • 19
  • Check out this solution https://stackoverflow.com/questions/73073196/how-do-i-fix-my-flutter-app-not-building-with-cloud-firestore – Luchi Nov 21 '22 at 13:27

0 Answers0