How to Fix: BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 61 on Apple Arm
Flutter project error on Apple Silicon Mac
📋 Table of Contents
The error you're encountering is due to the unsupported major version of the Java class file (61) on Apple Arm. This issue arises because Android Studio Canary 2020.3.1.22 uses a newer version of Java than what's supported by Flutter.
✅ Best Solutions to Fix It
Method 1: Update Java Version
- Step 1: Open the Terminal and run
brew upgrade --force javato update Java.
Method 2: Use a Different SDK Version
- Step 1: Open the Flutter project in Android Studio and go to
Settings>Build, Execution, Deployment>Compiler.
💡 Conclusion
By following these steps, you should be able to resolve the error and successfully run your Flutter app on Apple Silicon(ARM) Mac.
❓ Frequently Asked Questions
🛠️ Related Fixes
How to Fix: Pc crashes shortly after launching game (rainbow
Pc crashes shortly after launching game, possible cause: outdated grap
How to Fix: Installing an APK on a locked down phone
Installing an APK on a locked down phone: Try using a rooted device, e
How to Fix: FPS drops
FPS drops in games can be caused by high system resource usage, outdat