I'm trying to run android emulator, but instead of success I'm getting errors and lagged ui
Errors:
handleCpuAcceleration: feature check for hvf
cannot add library /Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed
added library /Library/Android/sdk/emulator/lib64/vulkan/libvulkan.dylib
cannot add library /Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libMoltenVK.dylib: failed
HVF error: HV_ERROR
qemu-system-x86_64: failed to initialize HVF: Invalid argument
Failed to open the hax module
No accelerator found.
qemu-system-x86_64: failed to initialize HAX: Operation not supported by device
added library /Library/Android/sdk/emulator/lib64/vulkan/libMoltenVK.dylib
I've already tried everything recommended steps from this post
Android Emulator 30.4.5 not working on MacOS
and from the other relative posts on stackoverflow and google search results, haven't succeed yet.
Mac OS Big Sur 11.2.3
For me worked a solution from this answer.
You have to download the emulator from the google repository https://dl.google.com/android/repository/emulator-darwin-6885378.zip and replace the one you have already installed, with the downloaded one.
If you have file quarantine enabled, as I did, you have to remove it from downloaded files:
xattr -r -d com.apple.quarantine /path/to/dir
After this, your emulator should work properly.
It looks like emulator update revision: 30.5.6 has solved this issue.
Related
I formatted my computer and have been trying to install Android Studio but have got many errors.
When I tried to install SDKs', I got this error:
Downloading http://dl.google.com/android/repository/android-ndk-r22b-windows-x86_64.zip
This download could not be finalized from the interim state. Retrying without caching.
However, it was downloaded again without any problem.
Then, I got this:
Failed packages:
- Layout Inspector image server for API 29-30 (skiaparser;1)
I tried to download it again but It didn't work.
After that, I tried to run the default flutter code on Pixel 4 emulator but I got error something like that (I couldn't remember exactly):
... "main" error : tag mismatch!
at javax.crpyto....
at javax.crpyto....
at java.security....
I fixed this error by deleting JDK 16 and installing JDK 8 (I'm not sure this fixed the errors.) but Android studio is still not working properly.
My question is what are the programs we need to install before installing the android studio? What are the necessary programs for Android studio to work properly?
Follow this tutorial to install Android Studio properly:
https://youtu.be/0zx_eFyHRU0
I can't open the emulator and I am really sad because I can't start my project.
The error says
"handleCpuAcceleration: feature check for hvf cannot add library /Users/myname/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed added library /Users/myname/Library/Android/sdk/emulator/lib64/vulkan/libvulkan.dylib cannot add library /Users/myname/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libMoltenVK.dylib: failed HVF error: HV_ERROR qemu-system-x86_64: failed to initialize HVF: Invalid argument qemu-system-x86_64: Back to HAX accelerator HAX is working and emulator runs in fast virt mode. added library /Users/myname/Library/Android/sdk/emulator/lib64/vulkan/libMoltenVK.dylib emulator: INFO: GrpcServices.cpp:301: Started GRPC server at 127.0.0.1:8554, security: Local"
AVD manager said this.
flutter doctor said there no problem.
Now I am thinking that the problem is due to the ANDROID_HOME variable thing, but I don't know how to fix it.
I would really appreciate it if you help me.
Thank you.
For me when I have this problem I have just updated the ANDROID EMULATOR from Android Studio.
Sometimes the problem creates due to the AVD manager as well.
Follow these steps if upgrading of Emulator not works:-
Go to: Tools > Android > AVD Manager
Press the edit (pencil) icon next to your AVD
Change Graphics to Software.
OR
To set the ANDROID_HOME path:
To fix it go to Android Studio settings, find the proper Android SDK location, update the environment variable and restart Android Studio / your PC.
I think this will help you and your emulator works. I have got the same thing and for me it works.
When I executed the following command.
emulator -avd Nexus_S_API_28_86 -wipe-data -no-boot-anim
I got the following error message.
Failed to open /usr/local/google/home/joshuaduong/emu/master/prebuilts/android-emulator-build/qemu-android-deps/windows_msvc-x86_64/qemu.conf, err: 2
The emulator starts and works fine. However, I am not comfortable receiving an error message. Moreover, I have no idea who "joshuaduong" is. I searched for this path in Android Studio files. Interestingly (or scary) enough, I found it in the following dll file:
C:\Users\<MyUserName>\AppData\Local\Android\Sdk\emulator\lib64\glib-2-vs11.dll
and in 8 exe files:
C:\Users\<MyUserName>\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system<something>.exe
Why would "joshuaduong" be in dll and exe files! Have these files been compromised? Avast Free Antivirus could not find anything wrong with them. What package/library should I re-install to get a fresh copy of these files. The ones I got have a timestamp of 12/12/2019. I think I downloaded some updates on that date.
Certainly no expert, but it looks like the Google engineer left the references of their library dependencies and bundled it all up by accident.
I certainly don't believe it's malicious. I'm running the Stable channel and I see it too when I run the emulator through console. I can't get my hands on the Canary channel right now, but it's possible this might've been fixed there since they updated the emulator yesterday.
I have created a blank activity project in Android Studio on Ubuntu 14.04. I can do a gradle build and install it to my device in one step using the installDebug target.
I wanted to work with the Nest API though, and I can't get the installDebug target to work. As a start, I downloaded their sample project and tried to build and install it in one go. I get this:
:testapp:installDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':testapp:installDebug'.
> com.android.builder.testing.api.DeviceException:com.android.ddmlib.InstallException: Unable to upload some APKs
I created an app largely based off of this sample which also isn't working. Does anyone know how to fix this? What's weird is - it used to work at some point!!
I tried blowing away my Android SDK and re-installing everything, and also re-cloning the project from Nest's git repo and starting over. It's not working anymore.
I am extremely pleased I have figured out a solution to this problem.
I started to notice something was more seriously up with my adb connection because adb shell for example would just hang.
I neglected to mention it, but I was using Ubuntu 14.04 in Oracle Virtualbox as the guest to a Windows 10 host. I think that may have something to do with it.
In VirtualBox, I went to Devices > USB > USB Settings and under Enable USB Controller I enabled USB 2.0 (EHCI) Controller. Previously this was set to 1.1.
My guess is if the application is large enough, USB 1.1 is too slow to transfer all of the data in a timely manner.
I hope this helps someone in the future.
it could be because of three things:
If you are using a device, your device is not plugged in correctly. Make sure you can see it when you run adb devices on the commandline.
If you are using an emulator,the emulator is not running or it has not booted up yet.
Your app is configured to use a buggy version of gradle. Version 1.3.1 is well known to cause this problem.
The most likely cause of this problem will gradle version 1.3.1.
In my experience, upgrading gradle did not fix the problem. To fix it, I had to downgrade it to a rather memorable version of 1.2.3.
Look for com.android.tools.build:gradle:1.3.1 in the android/build.gradle, and update it to com.android.tools.build:gradle:1.2.3.
I had another program that was using the adb and was interfering with the build.
I'm new to Android Development and I am attempting, and apparently failing, to set up the Android SDK with Eclipse. I thought I had everything working, but when I go to start the emulator I had set up I get the error message:
Starting emulator for AVD 'MyDevice'
Failed to start emulator: Cannot run program "/home/danny/android-sdk-linux//tools/emulator": error=2, No such file or directory
Note: I tried chmod-ing the directory containing the SDK as a search told me that would help, but it didn't work.
I'm on Ubuntu 13.10 and I'm using Eclipse. I also had another problem with the creation of a new project, but I'll wait and ask that in a new post in case the solution to this problem doesn't also solve that.
its your path as you have //in it..
directions on how to modify profile is at here:
install on Ubuntu