I am using flutter version 2.2.2 and the latest android studio for the moment. I have a Flutter project that worked fine few months ago, but now - after upgrading flutter and dart - it does not run.
I tried downgrading flutter and dart, but kept getting the same error when running:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':firebase_core:compileDebugJavaWithJavac'.
> java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0
* 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 18s
Exception: Gradle task assembleDebug failed with exit code 1
I have this pubspec.yaml dependencies:
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
http: ^0.12.2
email_validator: '^1.0.5'
path_provider: ^1.6.18
social_share: ^2.0.5
firebase_admob: ^0.10.2
I tried changing firebase_admob to google_mobile_ads but that did not solve the problem either.
I am already using AndroidX.
Can any body see a problem? Does anybody have a possible solution? Thanks!