Daniyal Dehghan
Daniyal Dehghan

Reputation: 11

Flutter app fails to run on Android emulator but works on iOS emulator

I’m having an issue where my Flutter app fails to run on the Android emulator, even though it runs without any problems on the iOS emulator.

I’ve tried different versions of Java and Gradle to resolve the issue, and I’ve verified their compatibility. For example, I used Java 17 with Gradle 7.6.3 and even tried several other higher and lower versions. Despite these attempts, I still encounter the same problem when running the app on the Android emulator.enter image description here

enter image description here

openjdk 17.0.13 2024-10-15 OpenJDK Runtime Environment Homebrew (build 17.0.13+0) OpenJDK 64-Bit Server VM Homebrew (build 17.0.13+0, mixed mode, sharing)

Upvotes: 0

Views: 54

Answers (1)

Danish Ansari
Danish Ansari

Reputation: 1

To fix your Flutter app not running on the Android emulator, try these steps:

  1. Run flutter doctor -v to check for setup issues.
  2. Ensure the Android SDK is correctly installed and configured.
  3. Use Java 11 and the default Gradle version (try flutter clean and rebuild).
  4. Verify Android emulator settings (API level, hardware acceleration).
  5. Run with detailed logs: flutter run -v.
  6. Update Flutter with flutter upgrade. Reinstall the Android emulator or recreate it in Android Studio.

Upvotes: 0

Related Questions