builttoroam / device_calendar

A cross platform plugin for modifying calendars on the user's device
https://pub.dev/packages/device_calendar
BSD 3-Clause "New" or "Revised" License
267 stars 267 forks source link

Does not build in release mode #553

Closed andreystavitsky closed 1 month ago

andreystavitsky commented 1 month ago

device_calendar: ^4.3.2

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.24.0, on Microsoft Windows [Version 10.0.22631.3880])
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2022 17.9.6)
[√] Android Studio (version 2024.1)
[√] VS Code (version 1.92.0)
[√] Connected device (3 available)
[√] Network resources
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':device_calendar:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
   > Android resource linking failed
     ERROR:\build\device_calendar\intermediates\merged_res\release\values\values.xml:2541: AAPT: error: resource android:attr/lStar not found.
thomassth commented 1 month ago

Try the 4.3.3 prerelease?

andreystavitsky commented 1 month ago

Try the 4.3.3 prerelease?

same

FlagElitov commented 1 month ago

I also had a problem with running on the last Flutter version. And I've found the solution.

Add this code to your pubspec.yaml, and it starts work.

  device_calendar:
    git:
      url: https://github.com/builttoroam/device_calendar
      ref: develop

but better use prerelease device_calendar: ^4.3.3-20240801

andreystavitsky commented 1 month ago

Try the 4.3.3 prerelease?

I was wrong, it works with 4.3.3 prerelease

gnunicorn commented 1 month ago

Trying to build an apk, I still get this error on the prelease and with develop.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':package_info:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
   > Android resource linking failed
     ERROR:/DEV/acter/a3/app/build/package_info/intermediates/merged_res/release/values/values.xml:194: AAPT: error: resource android:attr/lStar not found.

My flutter

 flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.1, on Manjaro Linux 6.6.46-1-MANJARO, locale de_DE.utf8)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2024.1)
[✓] Connected device (2 available)
[✓] Network resources

! Doctor found issues in 1 category.

The part of pubspec:

$ grep device_calendar -C 2 pubspec.yaml
  open_filex: ^4.5.0
  phosphor_flutter: ^2.1.0
  device_calendar: ^4.3.3-20240801
  quickalert: ^1.1.0

$ grep device_calendar -C 5 pubspec.lock 
      name: dbus
      sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac"
      url: "https://pub.dev"
    source: hosted
    version: "0.7.10"
  device_calendar:
    dependency: "direct main"
    description:
      name: device_calendar
      sha256: "23e3746e7e99dcbf2695f21a7270e97c374e99dcc2ee909d061688b1df88854b"
      url: "https://pub.dev"
    source: hosted
    version: "4.3.3-20240801"
  device_info_plus:

Regular run and bundle build seem fine.