unknown command-line option '--version'.

I'm trying to get an app to run on my Android Studio emulator, when I hit run it complains: Unknown command-line option '--version'

I've tried a few things

  1. Reinstalling AS
  2. Uninstalling & reinstalling sdks
  3. Deleting and reinstalling the emulator
  4. File > Manage IDE settings > Default settings, and resetting the IDE from there.
  5. Redownloading the Flutter plugin, my apps are written in Flutter.
  6. Updating with the latest Bumblebee patch to AS, also updating Flutter.
  7. Using the search box to search the project for --version

I have the tools SDK downloaded.

How does the run process work? Which files does it read first in the project to arrange its process? My emulator is Android API 30, my project's targetSdkVersion is 32.

Is there a fault in some AS IDE hooks/commands being unavailable from the command line? This appears to be what it says. I also can't run Flutter commands from AS's terminal.
If this is the problem how would I fix it?

Without this working, I can't run any apps on the emulator.


Solution 1: xbalaj

Go now and update to the Bumblebee February update. It solves the issue with environments. https://androidstudio.googleblog.com/2022/02/android-studio-bumblebee-202111-patch-1.html