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

system_alert_window example app fails to build on Android Emulator due to Java/Gradle incompatibility #131

Open
Turskyi opened this issue Nov 10, 2024 · 0 comments

Comments

@Turskyi
Copy link

Turskyi commented Nov 10, 2024

Describe the bug
When attempting to run the example app from the system_alert_window library on an Android emulator, the build fails with the following error related to Java and Gradle version incompatibility:

FAILURE: Build failed with an exception.

* What went wrong:
Could not open settings generic class cache for settings file '/Users/dmytro/development/multiplatform/Flutter/external/SystemAlertWindow/example/android/settings.gradle' (/Users/dmytro/.gradle/caches/7.4/scripts/2gxv3jrc9v0p9reynr1b6cjxo).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65

To Reproduce
Steps to reproduce the behavior:

  1. Check out the repository for the system_alert_window library from GitHub.
  2. Navigate to the example folder within the project.
  3. Open the example project in Android Studio.
  4. Attempt to run the app on an Android Emulator (Pixel XL API UpsideDownCake with Android API 33), Java 21.

Expected behavior
I expected the app to build successfully and launch on the Android Emulator so I could test the library’s functionality.

Versions (please complete the following information):
• system_alert_window: Latest version from GitHub (path dependency in pubspec.yaml)
• Device: Android Emulator, Pixel XL API UpsideDownCake, API Level 33
• OS: macOS 15.1, running Android Studio and Flutter

Additional context
I have tried the following steps without resolving the issue:

•	Upgraded Gradle to version 8.1.
•	Adjusted Java settings and versions to ensure compatibility.
•	Attempted to resolve any dependency conflicts by cleaning and rebuilding the project in Android Studio.
•	Tried using “Gradle Assistant” in Android Studio, but the issue persists.
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

1 participant