An error occurred building visual studio cordova app using multi-device-hybrid-apps

扶醉桌前 提交于 2019-11-27 08:08:14
Freddy V

I was getting the same errors. There are three environment variables that must be defined:

1) %JAVA_HOME% -- C:\Program Files (x86)\Java\jdk1.7.0_55

2) %ADT_HOME% -- C:\Users\YOUR_NAME_GOES_HERE\AppData\Local\Android\android-sdk

3) %ANT_HOME% -- C:\apache-ant-1.9.3

NOTE -- The paths for these programs may be totally different on your PC - You have to figure out the install paths for each.

Once you have defined these variables then copy the entry below into the Path variable for your user account (I have read elsewhere that it is best to add these to the beginning of the entry and not the end - thats what I did and it worked for me). Reboot PC after making all changes.

%JAVA_HOME%\bin;%ADT_HOME%\tools;%ADT_HOME%\platform-tools;%ANT_HOME%\bin;

*Taken from the "Installing 3rd party software manually" section in the official documentation.

Teerachai

i had same problem, after installing Android SDK Build-tool from Android SDK Manager the problem was solved

  1. go to directory of Android SDK as ...\AppData\Local\Android\android-sdk

  2. open SDK Manager.exe

  3. in list of packages Android SDK Build tools package not install and sdk manager will auto select lastest Rev. for you to install it

  4. click Install Packages wait until it done

  5. try to build project again

and i got apk files at directory .........\bin\Android\Debug and i can run it in BlueStacks

sorry my english language is bad . -*-

Ignatius Andrew

GO to Command Prompt and type:

npm install -g glob

Now try running your app, It should work.

Try to following these steps in order:

  • Ensure that the Android SDK is installed at %localappdata%/Android/android-sdk

  • Ensure that Android is updated to the latest API (API 19 at the time of writing)

  • Ensure the Android SDK path is setup correctly:

    • Add ADT_HOME as an environment variable and point it to the android-sdk folder

    • Add to System Path: "%ADT_HOME%\tools;%ADT_HOME%\platform-tools"

  • Reboot your machine

This should resolve the issue.

*Taken from the "Installing 3rd party software manually" section in the official documentation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!