cordova - Setting Android Home path in ionic framework -
i want run ionic project in android device.so ran following commands
- ionic add ionic-platform-web-client
- ionic plugin add phonegap-plugin push
- ionic io init
- ionic platform add android
all above commands executed.we tried run following command
ionic run android
i gives me error 'android_home' environment variable set non-existent path.try update manually point valid sdk directory.you may not have required environment or os run project.
how fix now?
set android development environment
before can build android applications, must install android sdk. installing android sdk installs avd manager, graphical user interface creating , managing android virtual devices (avds).
from android web site, download correct version of android sdk operating system.
unzip archive location of choosing. example, on linux or mac, can place in root of user directory. see android developers web site additional installation details.
configure android_home environment variable based on location of android sdk. additionally, consider adding android_home/tools, , android_home/platform-tools path.
windows set android_home=c:\\android-sdk-windows set path=%path%;%android_home%\tools;%android_home%\platform-tools
to run code in guide, need download , install latest sdk platform. using android sdk , avd manager installed in previous section.
open android sdk manager window
select tools checkbox.
select checkbox latest android sdk.
from extras folder, select checkbox android support library.
click install packages… button complete download , installation.
if not have android device testing, can use android virtual device.to this, must first install android sdk , install corresponding sdk platforms , packages. see set android development environment.
this command creates new avd named "default" based on android 5.1, api level 22:
android create avd --name default --target android-22 --abi armeabi-v7a
Comments
Post a Comment