how to completely remove android and all its files from mac? - android

Awhile ago I tried to get cordova working but the android emulator would never start. It just hangs with a black screen.
I had originally installed it with brew install android-sdk.
Then I read somewhere that was bad. So I have since removed it and installed Android Studio.
Either way, I could never get the emulator to bring up an app.
I have tried remove android studio by dragging to trash from Apps, but it seems to have left some files around.
I just recently tried running meteor which has a built in command for running/installing the android sdk, but alas, when I run the app there it just crashes too.
$ meteor run android
Starting android emulator
[[[[[ ~/projects/simple-todos ]]]]]
=> Started proxy.
=> Started MongoDB.
Unexpected exit code 1 from /Users/username/.meteor/android_bundle/android-sdk/tools/emulator [ '-avd', 'meteor' ]
stdout:
emulator: Failed to sync vcpu reg
emulator: Failed to sync HAX vcpu context
stderr:
HAX is working and emulator runs in fast virt mode
I have no idea. I just need to start over I guess. iOS works fine.
Here is a screenshot from Android Studio when I try to run the emulator:

I had a VM running apparently. No idea how, but I restarted the computer and emulator boots up fine as long as I don't run any other apps.

Related

react-native run-android not detecting emulator or device

When I run react-native run-android to run my React Native app I get this error and then the build fails:
'C:\Users\Alex\AppData\Local\Android\Sdk/platform-tools/adb' is not recognized as an internal or external command,
operable program or batch file.
error Failed to launch emulator. Reason: Emulator exited before boot..
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
I get this error whether I run the command with my phone connect by USB or if I run it with the emulator open from Android Studio. However, when I run adb devices both the emulator and my device show up.
I am pretty sure it is not a problem with the React Native code because I have tried running multiple different apps and get the same error.
Does anyone know what could be the problem and why the device and emulator aren't detected?
The problem was that my computer's antivirus had deleted adb.exe so once I reinstalled the platform tools folder containing adb.exe, react-native run-android worked as normal and my connected device was detected.

Emulator: Process finished with exit code -1073741515 (0xC0000135)

Android Studio 4.0, Emulator 30.0.12, Win 10
Everything has been ok, but today my AVD emulator stopped start and started to show error like this:
The emulator process for AVD Pixel_2_API_29 was killed.
if I start it from the AVD Manager or if I started Debug my project then:
Emulator: Process finished with exit code -1073741515 (0xC0000135)
I tried:
remove and install Android Studio ;
reinstalled all plugins, gradle, sdk, emulator;
But it all doesn't effect to it.
May be anyone knows how fix this bug?
Thx!
I've also faced the same situation many times and didn't get the exact error of why this happening from Android Studio.
To understand of what causes this issue, try running the emulator from command line (cmd on Windows) which will also show the whole errors and issues you have:
$ANDROID_SDK/emulator/emulator -avd <NameOfAVD> -verbose -show-kernel
P.S: To get the list of avd devices, go to "sdk_path\emulator" then run:
emulator -list-avds

cordova emulate android stuck in loading forever in CMD

The info I suppose would be useful to you:
cordova its version command tells me I have the following version: 9.0.0 (cordova-lib#9.0.1)
The emulator I use: Pixel 2 API_29
I start my emulator through the AVD manager (android studio)
How I start the emulator: cordova emulate android
So, when I use CMD to start my application, it basically ends up with loading dots.
Sometimes the launch etc. is successful, but sometimes, out of nowhere, it keeps on loading, but the launch is never successful.
The build is: success, the launch and deployment however fails.
The loading looks like this in cmd:
...................................................
but it never starts the application.
To give you an idea of how it looks:
(...) //above this line there is info about the build etc.
BUILD SUCCESSFUL in 8s
42 actionable tasks: 42 up-to-date
Built the following apk(s):
C:\Users\gamek\hexadecimal\platforms\android\app\build\outputs\apk\debug\app-debug.apk
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Users\gamek\AppData\Local\Android\sdk (DEPRECATED)
..............................................................................
The desired behavior I am looking for:
Not have to live in fear whether the application will start in the emulator or not.
I want the application to start in the emulator when I run the command:
cordova emulate android
You can either:
Check that the emulator memory requirements are not too excessive for your system's resources (lower RAM allocated for example, but not below 1024 MB)
Start the emulator manually immediately after booting
Don't close the emulator anymore, leave it running so you can deploy without issues
More Android emulator tips here, make sure you have installed Intel HAXM if you have an Intel processor, or enabled Windows Hypervisor Platform in Windows Features if you have AMD.

Ionic run android is not building apk

I shifted development of my ionic app from windows to ubuntu 14.04 now. I installed everything new. "Ionic build android" command is working but when i run "ionic run android" or "ionic emulate android" it only starts emulator no BUILD SUCCESS and LAUNCH SUCCESS is shown in console. Also app does not get installed in emulator.
ajeet#samsung:~/deployments/mobile_app/chmapp$ ionic run android
Native thread-sleep not available.
This will result in much slower performance, but it will still work.
You should re-install spawn-sync or upgrade to the lastest version of node if possible.
Check /usr/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/cross-spawn/node_modules/spawn-sync/error.log for more details
Running command: /home/ajeet/deployments/mobile_app/chmapp/hooks/after_prepare/010_add_platform_class.js /home/ajeet/deployments/mobile_app/chmapp
add to body class: platform-android
ANDROID_HOME=/opt/android-sdk
JAVA_HOME=/usr/lib/jvm/default-java
No target specified, deploying to emulator
No emulator specified, defaulting to Nexus
Waiting for emulator...
sh: 1: glxinfo: not found
sh: 1: glxinfo: not found
emulator: WARNING: VM heap size set below hardware specified minimum of 256MB
emulator: WARNING: Setting VM heap size to 512MB
console on port 5554, ADB on port 5555
As discussed in comments.
Keep the emulator running first and then execute. Invoking the emulator at runtime often leads to timeout.
Run this command, it will show the missing things
npm list
would shows you need "try-thread-sleep" to use spawn-sync.
So, add bellow in your "package.json" and "npm install" again.
"try-thread-sleep": "^1.0.0".
Hope it will help. copied.
you need to install emulator in Ubuntu then only you can able to see the output in emulator

How to set the default Android Emulator

I am building an app with NativeScript, where I run:
$ tns run android --emulator
to build the app and launch it in an emulator. When I do this, the default android emulator boots on my machine, which is unusably slow...
In all the demos, they are using the Genymotion Emulator. I have installed this, but the NativeScript command still launches the default emulator. How do I get this to launch on the genymotion emulator?
NB: I am using Windows 10
Update:
Even if I run the command with the Genymotion emulator running (and nothing else), I get the following log output and a new terminal window is opened running android-sdk/tools/emulator-arm.exe
BUILD SUCCESSFUL
Total time: 11.959 secs
Project successfully built.
Using C:\Users\George\Source\Repos\NativeScript-App\Bluetooth\platforms\android\build\outputs\apk\bluetoothdemo-debug.apk
Starting Android emulator with image Xamarin_Android_API_23
That looks as though it is referencing the emulator I had been using when I was developing with Xamarin. Any ideas where I can change that, or why that is being called?
start Genymotion, then start one of the devices that you have setup in Genymotion
then check that the device is seen:
$ tns device
then run nativescript like so
$tns run android --geny 192.111.222.33:555
(or whatever is the name that you get from the tns device command)
To my experience --emulator always tries to start the stock emulators. Try to start genymotion and then just tns run android (w/o the --emulator option).
I think it does that when there is no emulator running.
Try starting Genymotion first, launch the image you want, then run the "tns run adroid" command.
I had a similar issue.
To use GenyMotion by default, first delete all the Android emulators using
android avd
I then followed the solution on this thread:
React-Native, Android, Genymotion: ADB server didn't ACK
Edit the settings in GenyMotion to use the android SDK you downloaded. (path for Windows is Users/YOUR-SYSTEM/AppData/Local/Android/android-sdk)
You still have to run the device on GenyMotion before running the emulator
tns run android

Categories

Resources