0

Im new to flutter; After I opened my Android Emulator and pressed to run my phone, I receive a error message.

'Launching lib/main.dart on sdk gphone x86 arm in debug mode... Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

What went wrong:

Could not open settings generic class cache for settings file '/Users/maximilian/Developer/FlutterProjects/sr/android/settings.gradle' (/Users/maximilian/.gradle/caches/6.7/scripts/f0emg6u6oecmxqzgk5g9nn4ui).

BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 60

Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 788ms Exception: Gradle task assembleDebug failed with exit code 1'

My Project Settings -> SKDs I have a JDK 1.8 (Java SE 8) and Android 30.

My Flutter Doctor Output is (I intentionally did not install Xcode):

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.3, on Mac OS X 10.15.7 19H524 darwin-x64,
    locale en-GB) 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) 
[✗] Xcode - develop for iOS and macOS
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS
      development.
      Download at: https://developer.apple.com/xcode/download/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
        sudo xcodebuild -runFirstLaunch
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin
        code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install see
      https://guides.cocoapods.org/using/getting-started.html#installation for
      instructions. 
[✓] Chrome - develop for the web 
[!] Android Studio (version 2020.3)
    ✗ Unable to find bundled Java version. 
[✓] IntelliJ IDEA Community Edition (version 2021.2) 
[✓] Connected device (2 available)

! Doctor found issues in 2 categories.
Spatz
  • 15,734
  • 6
  • 54
  • 57
Max Clark
  • 1
  • 2
  • Can you try `./gradlew assembleDebug --stacktrace` , it will be more clear with what exactly went wron – gtxtreme Aug 05 '21 at 15:57

0 Answers0