I am following http://learn.ionicframework.com/videos/windows-android/ When I run
ionic build android
I have following error:
Updated the hooks directory to have execute permissions
running cordova build android
Running command: C:\Windows\system32\node C:\_Learn\ionic\firstIonicApp\hooks\after_prepare\010_add_platform_class.js C:\_Learn\ionic\firstIonicApp
Error: Hook failed with error code ENOENT: C:\_Learn\ionic\firstIonicApp\hooks\after_prepare\010_add_platform_class.js
at C:\Users\Username\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:195:23
at _rejected (C:\Users\Username\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:797:24)
at C:\Users\Username\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:823:30
at Promise.when (C:\Users\Username\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:1035:31)
at Promise.promise.promiseDispatch (C:\Users\Username\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:741:41)
at C:\Users\Username\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:557:44
at flush (C:\Users\Username\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:108:17)
at process._tickCallback (node.js:355:11)
at Function.Module.runMain (module.js:503:11)
at startup (node.js:129:16)
My Android Home:
C:\\>echo %ANDROID_HOME%
C:\\Program Files (x86)\\Android\\android-sdk
There is an open issue on Github
And the workaround that I am using is just rename the after_prepare folder
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.