0

I'd tried to used flutter to development, but when I used android emulator I got this error.

Execution failed for task ':firebase_core:compileDebugJavaWithJavac'. Could not find tools.jar

I tried add

android.useAndroidX=true android.enableJetifier=true

or

org.gradle.java.home=/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home

in gradle.properties, but it was same issues.

And when I command flutter doctor, I got this information.

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.0.1 21A559 darwin-x64, locale en-AU)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[!] Android Studio
    ✗ Android Studio not found at /path/to/android/studio/Contents
[✓] VS Code (version 1.63.2)
[✓] Connected device (3 available)
    ! Error: S  iPhone is busy: Fetching debug symbols for S  iPhone. Xcode will
      continue when S  iPhone is finished. (code -10)

! Doctor found issues in 1 category.

How can fix it?

Stanley
  • 31
  • 4

1 Answers1

0

Go to C:/users//.gradle/cache delete everything then run again. I hope this helps.

  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/31834494) – Dani3le_ May 26 '22 at 15:02