flutterfire
flutterfire copied to clipboard
🐛 [cloud_firestore] Execution failed for task ':cloud_firestore:compileDebugJavaWithJavac'
Bug report
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
@imijanur
Can you try by deleting pubspec.lock
, run flutter clean
and then flutter run
to see if it helps ?
Also, check if any of the third party plugin you are using could be causing any conflict with flutterfire plugins or not.
@darshankawar
I have tried it too, but there is no use, you can see the log its from cloud_firestore
plugin,
Its unable to import this class while compiling the package import com.google.firebase.firestore.TransactionOptions;
I dont find many issue regarding this thats why reported it. I really need help to run my app
I am unable to replicate this error using latest version of the plugin and using latest master version of the framework.
Can you try adding firebase_auth_platform_interface
library and see if it helps ?
Also, as suggested earlier, see if any of the community plugins you are using may be conflicting with latest version of cloud_firestore
by commenting them one by one from pubspec.yaml
and see which one could be causing the error.
I have tried all this but there is not proper solution, I have tried removing this package and then app works fine,
Here is another question on stacoverflow where I have written about the exact behavior of the run, please go through this too.
https://stackoverflow.com/questions/73810808/missingpluginexceptionno-implementation-found-for-method-documentreferenceget
Anyways this solution already given by someone when I have reported issue on github but that didn't work.
Can you please check it out ?
On Wed, 21 Sept 2022, 18:55 darshankawar, @.***> wrote:
@imijanur https://github.com/imijanur Can you try by deleting pubspec.lock, run flutter clean and then flutter run to see if it helps ?
Also, check if any of the third party plugin you are using could be causing any conflict with flutterfire plugins or not.
— Reply to this email directly, view it on GitHub https://github.com/firebase/flutterfire/issues/9584#issuecomment-1253707805, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5N2AGQEZEUJAR4U22K6ADV7MEEBANCNFSM6AAAAAAQR7WQQQ . You are receiving this because you were mentioned.Message ID: @.***>
What's your sdk version listed in android\app\build.gradle:
?
See this similar issue : https://stackoverflow.com/questions/73073196/how-do-i-fix-my-flutter-app-not-building-with-cloud-firestore
Compiled sdk 33 Target 33 Minsdk 25
On Thu, 22 Sept 2022, 16:21 darshankawar, @.***> wrote:
What's your sdk version listed in android\app\build.gradle: ?
See this similar issue : https://stackoverflow.com/questions/73073196/how-do-i-fix-my-flutter-app-not-building-with-cloud-firestore
— Reply to this email directly, view it on GitHub https://github.com/firebase/flutterfire/issues/9584#issuecomment-1254856267, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5N2AB2E7UW3TPSAISVXVTV7Q23TANCNFSM6AAAAAAQR7WQQQ . You are receiving this because you were mentioned.Message ID: @.***>
Can you try with previous plugin versions one by one, ie, 3.4.7, 3.4.6 and see if you still get same error ? I am unable to replicate this after trying again.
Let me try again with 3.4.6 cause I have tried with 3.4.7 but same issue occurs
On Thu, 22 Sept 2022, 16:30 darshankawar, @.***> wrote:
Can you try with previous plugin versions one by one, ie, 3.4.7, 3.4.6 and see if you still get same error ? I am unable to replicate this after trying again.
— Reply to this email directly, view it on GitHub https://github.com/firebase/flutterfire/issues/9584#issuecomment-1254865010, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5N2ADUM4TKVH2PHMUH5HLV7Q357ANCNFSM6AAAAAAQR7WQQQ . You are receiving this because you were mentioned.Message ID: @.***>
Still not working, after downgrading to 3.4.6 too
On Thu, 22 Sept 2022, 16:30 darshankawar, @.***> wrote:
Can you try with previous plugin versions one by one, ie, 3.4.7, 3.4.6 and see if you still get same error ? I am unable to replicate this after trying again.
— Reply to this email directly, view it on GitHub https://github.com/firebase/flutterfire/issues/9584#issuecomment-1254865010, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5N2ADUM4TKVH2PHMUH5HLV7Q357ANCNFSM6AAAAAAQR7WQQQ . You are receiving this because you were mentioned.Message ID: @.***>
I am unable to replicate this issue, so keeping it open for further insights from the team.
/cc @russellwheatley
Hi @imijanur, have your problem solved? I'm also facing the same issue.
@gourav6m17 , nope not yet, but I have created a new project for this and didn't use the unnecessary packages, its working on the new project
Can either of you try flutter pub upgrade
and confirm ?
@darshankawar tried but same issue again and again. So downgrade only firestore with cloud_firestore: '2.5.3'
other firebase plugins are as:
firebase_core: ^1.22.0
firebase_messaging: '13.0.2'
Hey @imijanur, please provide the exact steps to reproduce this error. There isn't much we can do until we can reproduce. Thanks.
Hey @imijanur. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@imijanur if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.