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

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

Closed
dipinsonwani opened this issue Oct 6, 2024 · 4 comments
Closed

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

dipinsonwani opened this issue Oct 6, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@dipinsonwani
Copy link

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)

@dipinsonwani dipinsonwani added the bug Something isn't working label Oct 6, 2024
@dipinsonwani dipinsonwani changed the title [BUG] Build fails to build the android app [BUG] Gradle fails to build the android app Oct 6, 2024
@Sarat-1997
Copy link

@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
Copy link
Author

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
Copy link

@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.

@mateusz-bak
Copy link
Owner

mateusz-bak commented Oct 23, 2024

I think i fixed all the issues with #603
The Android build works now on Flutter 3.24.3

As a temporary solution for shared_storage being discontinued I removed some parts of the code and will be migrating to similar package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants