0

I am trying to setup my first attempt at a project with Cordova. I have Android Studio, node.js and cordova all installed fine. I followed instruction from below but when I try to build the demo project I get this error below. I have looked at the problem and read that I need to change the config file. Which config file? The one in the workshop folder has no reference to these paths? Any advice would be great and hitting a wall here.

The guide

https://ccoenraets.github.io/cordova-tutorial/create-cordova-project.html

The error

Android Studio project detected
Failed to find 'ANDROID_HOME' environment variable. Try setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.
larry chambers
  • 473
  • 1
  • 6
  • 19

2 Answers2

0

You will need to add android/tools and platform-tools to your path. Find the path to the installed SDK and use one of the approaches mentioned in this post. The same idea applies even if you aren't on Windows 7.

How to add android tools dir to windows 7 path?

JC3
  • 1
  • 1
0

firstly remove the android studio and install again by downloading from the [1]: https://developer.android.com/studio and then after downloading unzip the file and install it where you have downloaded the zip file. after installing move the folder to /usr/local/ (in case) of Linux to make it usable for all users. now you need to set ANDROID_HOME and PATH for this just go to terminal and place this command

export ANDROID_HOME=$HOME/Android/Sdk

export PATH=$PATH:$ANDROID_HOME/tool

and you are done