Gustavo Martins
Gustavo Martins

Reputation: 101

ERROR android-emu/android/qt/qt_setup.cpp:28:Qt library not found at ..\emulator\lib64\qt\lib Could not launch 'C:\Users: No such file or directory

I am trying to work with the native native for a school project, but when executing the following command in cmd: emulator -version he returned this error to me:

[4640]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at ..\emulator\lib64\qt\lib

Could not launch 'C:\Users\gusta..\emulator\qemu\windows-x86_64\qemu-system-i386.exe': No such file or directory

already changed the path in several ways and I think the problem is not this so if someone can help me grateful

Upvotes: 10

Views: 6702

Answers (5)

IronBlossom
IronBlossom

Reputation: 3917

There are two emulator executables in the sdk (as of now):

  • sdk/tools/emulator
  • sdk/emulator/emulator

The emulator executable has to be added in the PATH variable, in a way so that

sdk/emulator/emulator comes before sdk/tools/emulator

Open Windows Setting Search for Environment Variables. Located Path and double-click. In the opened list you will see both SOME PATH\Android\Sdk\emulator and SOME PATH\Android\Sdk\tools. Select PATH\Android\Sdk\emulator and move it upper than Sdk tools by click on Move Up buttons on the right.

Upvotes: 9

Boyardee
Boyardee

Reputation: 324

On MacOS, if running M1+, edit your .zshrc file and ensure it has the following:

#Android SDK
export ANDROID_HOME=/Users/yourname/Library/Android/sdk #or wherever your Android SDK is
export PATH=$ANDROID_HOME/tools/bin:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/emulator/emulator:$PATH 
export PATH=$ANDROID_HOME/emulator:$PATH

You need both the emulator lines, making sure emulator/emulator is first exported to the PATH, and then the solitary emulator folder. There is still an emulator resolution issue in recent versions of Android Studio emulator.

Don't forget to save the file and then restart you terminal, or reload your config with:

source ~/.zshrc

Upvotes: 0

Diego Montoya
Diego Montoya

Reputation: 139

Based on the answer of IronBlossom.

On mac these are the important environment variables that need to be adjusted.

export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools

Make sure that emulator comes before tools

Upvotes: 6

samson ojo
samson ojo

Reputation: 169

To resolve this error:

Your system variables should look like below:

“C:\Users\username\AppData\Local\Android\Sdk”    -ANDROID_HOME
“C:\Users\username\AppData\Local\Android\Sdk\tools\bin” -PATH
“C:\Users\username\AppData\Local\Android\Sdk\platform-tools”  -PATH
“C:\Users\username\AppData\Local\Android\Sdk\emulator” - PATH
“C:\Users\username\AppData\Local\Android\Sdk\tools" -PATH

This worked for me.

Upvotes: 3

muratoner
muratoner

Reputation: 2702

Do this to solve the error:

  • Edit the system environment variables
  • Make sure you have set user variable for ANDROID_HOME
  • Remove any variable /path/to/android-sdk/tools from user and system environment variable.
  • Save and exit

Upvotes: 5

Related Questions