Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android build fails - Deprecated api #463

Closed
Pingolus opened this issue Dec 19, 2022 · 2 comments
Closed

Android build fails - Deprecated api #463

Pingolus opened this issue Dec 19, 2022 · 2 comments

Comments

@Pingolus
Copy link

Hi,

Flutter pub get outputs some warnings about device_calendar :

The plugin `device_calendar` uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future
release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

And app build fails for Android :

e: [...]snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/device_calendar-3.9.0/android/src/main/kotlin/com/builttoroam/devicecalendar/CalendarDelegate.kt: (674, 36): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity?
e: [...]snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/device_calendar-3.9.0/android/src/main/kotlin/com/builttoroam/devicecalendar/CalendarDelegate.kt: (870, 65): Using 'max(): T?' is an error. Use maxOrNull instead.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':device_calendar:compileReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

This is my flutter doctor summary :

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.9, on Ubuntu 20.04.5 LTS 5.4.0-135-generic, locale fr_FR.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.74.0)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

Is this package still maintained, is there any solution ?

Thanks

@thomassth
Copy link
Contributor

I don't think we've been maintaining 3.x versions
Try upgrading the package?

@sowens-csd
Copy link
Contributor

Given the lack of comment since December this is likely closed. Please open a new issue if you're still having problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants