Ionic run error with genymotion


#1

I want to debug the app with genymotion. I follow this link https://codecraft.tv/courses/ionic1/ionic-overview/setting-up-the-genymotion-android-emulator/, but when I use ionic run I encounter this error

Error: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.

First of all, I install genymorion in D drive as my OS in C drive has very limited drive space left.

How shall I do to eliminate the issue?


#2

Before you can use genymotion or any android emulator, you must install first the android sdk.
the android sdk is use by the ionic/corodova to package/build your html/js/ts to a working “.APK”

please follow this guide here


#3

I do have an android studio SDK in D:/adk-tools directory.

And my ionic app directory is D:/myapp/

So how shall it properly do? Please advice


#4

Check if it is added as a variable on your environment.

Right click mycomputer->properties->advanced system settings->Advanced-Environment Variables
See the “system variables” check if their is an “ANDROID_HOME” with a value of your sdk location which is D:/adk-tools directory.

If there is,try to check if it is working:
open command prompt, type adb

  • you must see “android debug bridge version …etc…”

If NO,then you must add it as "ANDROID_HOME"
please see this as reference on how to add
https://cordova.apache.org/docs/en/latest/guide/platforms/android/


#5

Thanks ralphskie
Is it the highlighted is “system variables”?

Click New… and enter the variable name and value

what is to put in variable name and value?
variable name = ANDROID_HOME"
and variable is the path?


#6

yes thats it…after that test if you can issue an “adb” command in command prompt


#7

Still have the same errors after all the steps

call adb has no problem to load

The path for “ANDROID_HOME” set

In genymotion, I also try to set with the adb path. Either default or custom android SDk gave the same error

what do I missing?


#8

I also try with set ANDROID_HOME=D:\sdk-tools-windows-3859397\ and set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-too‌​‌​ls but still return same error.

any idea?


#9

I had a very problem when I installed android sdk in my D drive instead of C. I couldnt solve the problem for a really long time. Drove me crazy. In the end I uninstalled the sdk and installed it in my C drive. After that everything worked flawlessly.


#10

unfortunately, I run out of space in C.


#11

I have add path but still return the same error and ANDROID_HOME path change to root