Android emulator won't start on Mac OS 10.13 - crash

I just installed Android Studio 3.0.1 on my Mac with OS 10.13.2 but the emulator doesn't start. All I see is some errors in the event log:
Emulator: Failed to open vm 4
Emulator: Failed to create HAX VM
Emulator: No accelerator found.
Emulator: failed to initialize HAX: Invalid argument
I know this question has been asked before, but none of the solutions work for me. Is there a work around for this problem? Or should I just wait for fix in Android Studio/HAXM/Hypervisor.Framework/Mac OS?

"Hakintosh" user here...
Had the same issue.
My solution was to turn on Inter Virtualisation Technology in Bios settings.
Hope it helps for someone!

I had the same issue and fixed it following these steps:
In Android SDK Manager -> SDKTools uninstall the following:
Intel x86 Emulator Accelerator (HAXM installer)
Then download the HAXM installer and install it from here: HAXM Installer
Finally, open
~/Library/Android/sdk/emulator/lib/advancedFeatures.ini
and change the line 'HVF = off' to 'HVF = on'

I was able to resolve this by going to SDK Manager > SDK Tools (tab)
and re-installing:
Android SDK Build tools
Android Emulator
Android SDK Platform-tools
Intel x86 Emulator Accelerator (HAXM Installer)

Related

Windows 10 WSL2 expo cannot find simulated android device from Android Studio

I am new to android development and am trying to learn react-native by following a tutorial here. The problem is whenever I try to start my react-native project within my simulated android device, expo cli cannot find it. This step is at the 25 minute mark of the video and my progress can be summarized as follows:
I have react-native on my machine and have installed expo cli
I've downloaded Android Studio which is located: C:\Users..\AppData\Local\Android\Sdk
I have my emulated android device up and running via Virtual Device
Manager
After typinng "npm start" When I type "a" within the terminal of WSL to run this app on my virtual android device I get the following message when it tries to open the emulator:
No Android connected device found, and no emulators could be started
automatically. Please connect a device or create an emulator
(https://docs.expo.dev/workflow/android-studio-emulator).
At which point my expo developer tools browser window displays that
Expo Developer Tools is disconnected from Expo CLI. Use the expo start
command to start the CLI again
When I goto the terminal and do this, it just restarts this failure over again when I type "a" to start my app in the simulated android device. Some of the solutions I've tried are:
following the documentation on the workflow android studio emulator link. I find though that all of the options within my version of android studio look drastically different, and that my file location is much different than what they have listed.
uninstalling and reinstalling Android Studio
Making sure SDK tools is checked as per this stack overflow post
following the instructions in this stack overflow post, however I am not trying to connect a phone via usb so this does not help me.
My setup is as follows:
OS: Windows 10
VM: WSL2 Ubuntu 20.04.3 LTS
Text Editor: Visual Studio Code 1.63.2
Android Studio: BumbleBee 2021.1.1
Expo CLI version: 5.0.3
here are some screen shots:
^ that one is right before I try to type "a" within the expo cli within terminal.

Expo-react-native :Couldn't adb reverse: device 'adb' not found

I am using react-native-expo for mobile app development.
I use an android emulator for the app, vscode editor for development.
It started showing me this error from few days.
› Opening on Android...
Couldn't adb reverse: device 'adb' not found
› Opening exp://10.0.46.81:19000 on Device adb
Couldn't start project on Android: Error running adb: device 'adb' not found
› Press ? │ show all commands
I tried wiping the emulator, tapping on the build number in the emulator, but nothing worked out.
I've deleted the virtual devices and created new one. It worked for one time and again this process isn't working.
there isn't much about this on the internet.
need help.
Just try this. It is work for me.
make sure you already add android sdk path in setting > appearance & behavior > system settings > android SDK > android SDK location
(Common path is C:\Users(name)\AppData\Local\Android\Sdk)
create new variable name and value in Environment Variables (User Variables)
(ANDROID_HOME C:\Users(name)\AppData\Local\Android\Sdk)
add new Path in Environment Variables (User Variables)
(C:\Users(name)\AppData\Local\Android\Sdk\platform-tools)
It is work for me after I have solved it for 3 hours.
At first, I don't face the problem like this in flutter but in react-native.
The fix for me was to install the SDK Platform for the android version used by the AVD.
In my case, I installed android v9 (Pie) via the AVD Manager when setting up my AVD for the first time, and when I looked into this issue I noticed that the SDK Platform for v9 was not installed as part of that setup.
The exact steps I took are as follows:
Disclaimer: You might not need to follow these steps exactly to resolve the issue
Close all CMD and IDE programs.
Open Android Studio and navigate to AVD Manager
Click the down arrow for the target AVD and click the Edit option
Set the device to Cold boot instead of Quick boot
Open SDK Manager, and download the SDK Platform for android version used by AVD
Go back to AVD Manager, click the Cold boot now option
Open a CMD terminal as administrator, CD to project repo, and run expo start
Launch expo in AVD
DONE
I had the same problem. Emulator started working after this:
Delete caches from Android Studio
Wipe data from your emulator
Cold boot to restart
When I was solving this problem I also ended up doing these:
Check Android studio updates
Reinstalled Android studio
Check SDK updates from SDK tools: SDK Manager -> Android SDK -> SDK tools. You can see if there is a new update available on the right.
Go to Virtual Device Manager -> Select your Device -> Actions -> Click "Drop down" button and select "Cold Boot Now".
This worked for me.
For my case, I went to the avd and simply clicked "wipe data", restarted both my avd and server and it worked
By my side the problem was is In Internet Connection. I just changed the WiFi and everything working fine.

Unable to launch app via appium capabilities but app launched successfully via 'xcrun simctl install booted install myApp.app'

Error message: ‘myApp.app’ cannot be opened because the developer cannot be verified.
I face above error when I install the myApp.app using Appium on my iOS simulator. However, when I install the same myApp.app using terminal command ‘xcrun simctl install booted install myApp.app’ then the app installed/launched perfectly fine.
Note: I am a tester hence I have not built the app using XCode and moving forward I will be getting the .app file only from the developer for testing.
Below are the details
Appium desktop client version : 1.15.1
macOS version : 10.15.2
XCode version: 11.3
I am using below appium desired capabilities for iOS
{
“platformName”: “iOS”,
“platformVersion”: “13.3”,
“deviceName”: “iPhone 8”,
“automationName”: “XCUITest”,
“app”: “/Users/harj/Desktop/myApp.app”,
“bundleId”: “com.abc.xyzApp”,
“commandTimeouts”: 60000,
“noReset”: false,
“autoGrantPermissions”: true,
“useNewWDA”: true,
“showXcodeLog”: true
}
Appium logs
There are many errors in the log but i found this one relevent
Original error: ‘idb’ has not been found in PATH. Is it installed? Read https://www.fbidb.io for more details
That would be great if someone faced the same problem and got a solution.
Happpy Testing
harj
I can able to launch the sample .app file on simulator with below versions.
I have resolved setup issue for simulator 13.4 version with xcode 11.4.
Simulator-: 13.4
xcode -: 11.4
mac os. -: 10.15.4
appium v -: 1.17.0
If you still face any issue then let me know. with appium logs and whole details.
Finally, the solution has been found.
Actually, the problem is with the macOS Catalina not with the Appium. The OS was preventing the .app to install on the simulator. There are two ways to solve this problem.
1) Degrade the gatekeeper(security) check on your mac.
2) Quarantine that specific app using below terminal command
xattr -dr com.apple.quarantine /yourAppPath/myApp.app
I recommended the option2 as it will keep your mac safe from attacks.

Error in USB debugging live testing in React Native

I am new to React Native and I install React Native and I want to test using y device (Realme 2).
Using USB debugging, but I am stuck on this same mobile using Android Studio runs in ADB.
This stucks at this position I await multiple 15m
info Starting JS server...
info Installing the app...
Configure project :app
File C:\Users\Muhammed Sajid Ali.android\repositories.cfg could not be loaded.
Checking the license for package Android SDK Platform 28 in D:\sajid\AndroidSdk\licenses
License for package Android SDK Platform 28 accepted.
Preparing "Install Android SDK Platform 28 (revision: 6)".
<======-------> 50% CONFIGURING [15m 0s]
:app
I solved this.
I earlier installed the Android SDK 8, 7.4.4, and 9 versions, but my mobile was 8.1. That’s why
it didn't start and it was downloading SDK 8.1. As I saw in the Android SDK folder, there was a new folder with some files.
Then I downloaded the 8.1 SDK, and it ran perfectly.
I think that was no problem with your compiler behavior, but I can suggest you to check if installing the app from USB is permitted in your phone's developer option and try to trigger the compiler with pressing return key (or enter) on the command line. That was working on mine.

Can react native be installed in AMD processor?

I use a laptop with AMD processor. I've tried install react, but problematic on its haxm. Is there any other way for me to install react-native on AMD?
You can install all the dependencies needed to use React-Native on a computer with AMD processors. The problem is that, at the moment, Android Studio has no emulators running the requiered version of Android that are also compatible with AMD architecture; so you won't be able to test your application on the Virtual Device provided by Android Studio.
You may either:
A) Use a physical device (mobile phone) to run your application
B) Download a different emulator and use it as if it was connected through USB
As you won't be using Android Studio emulator, you don´t need to install HAXM