mateusz-bak / openreads

A mobile books tracker written in Flutter that respects your privacy.
GNU General Public License v2.0
894 stars 53 forks source link

[BUG] Gradle fails to build the android app #598

Open dipinsonwani opened 1 week ago

dipinsonwani commented 1 week ago

Describe the bug Build fails due to compilation error with gradle

To Reproduce Steps to reproduce the behavior:

  1. Open project code in IDE
  2. run - flutter build apk

Expected behavior Should build the app and export the apk

Screenshots

* What went wrong:
Execution failed for task ':connectivity_plus:compileReleaseJavaWithJavac'.
> error: invalid source release: 17

Additional context

[✓] Flutter (Channel stable, 3.24.3, on macOS 15.0 24A335 darwin-arm64, locale en-IN) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) [✓] Xcode - develop for iOS and macOS (Xcode 16.0) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.3) [✓] VS Code (version 1.93.1) [✓] Connected device (3 available)

Sarat-1997 commented 1 week ago

@dipinsonwani can you please refer this below mentioned link?

https://stackoverflow.com/questions/78332355/flutter-error-invalid-source-release-17-when-using-connectivity-plus-package

I hope it might be helpful for you!!

dipinsonwani commented 1 day ago
Execution failed for task ':shared_storage:compileReleaseKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileReleaseJavaWithJavac' (1.8) and 'compileReleaseKotlin' (17).

I believe we would have to replace this package. As this library seems to be discontinued. https://pub.dev/packages/shared_storage

Sarat-1997 commented 1 day ago

@dipinsonwani in pubspec.yaml add like this shared_storage git: url:https://github.com/alexrintt/shared-storage

After that run pub get then save and run the apk.