0
votes

I have set my Environment Variables, yet I continue to get the following 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.] ERROR building one of the platforms: Error: cmd: Command failed with exit code 2 You may not have the required environment or OS to build this project Error: cmd: Command failed with exit code 2 at ChildProcess.whenDone (C:\Users\oneilj\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:139:23) at emitTwo (events.js:87:13) at ChildProcess.emit (events.js:172:7) at maybeClose (internal/child_process.js:818:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

I have uninstalled Android Studio and all the SDKs, and even un-installed nodeJS and cordova. After re-installing everything I still get the error.

1

1 Answers

1
votes

I found this while waiting for an answer. The fix was from another user's question and answer:

Download tools_r25.2.3-windows.zip from Android Downloads. Extracted zip on desktop Replaced C:\Users\username\AppData\Local\Android\sdk\tools with extracted sub-folder tools/ In project folder:

$ cordova platforms remove android $ cordova platforms add android