i tried to type :
cordova requirements
and it is give result as :
Android Studio project detected
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-27,android-26
Gradle: not installed
Cannot read property 'length' of undefined
(node:2392) UnhandledPromiseRejectionWarning: CordovaError: Some of requirements check failed
at C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\src\cli.js:414:27
at _fulfilled (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
at C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:557:44
at flush (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:2392) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2392) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code
so i tried to install gradle manually. And after the gradle was installed, i tried to type:
gradle -v
and then it is give result as :
------------------------------------------------------------
Gradle 4.7
------------------------------------------------------------
Build time: 2018-04-18 09:09:12 UTC
Revision: b9a962bf70638332300e7f810689cb2febbd4a6c
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 1.8.0_162 (Oracle Corporation 25.162-b12)
OS: Windows 7 6.1 amd64
it means the gradle was installed. But when i try to cek the requirements again with type :
cordova requirements
it still give me same result like before as :
Android Studio project detected
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-27,android-26
Gradle: not installed
Cannot read property 'length' of undefined
(node:2392) UnhandledPromiseRejectionWarning: CordovaError: Some of requirements check failed
at C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\src\cli.js:414:27
at _fulfilled (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
at C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:557:44
at flush (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:2392) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2392) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code
And after that, i tried again to install gradle in cmd with command :
npm install gradle
and it is give result as :
[email protected]
added 20 packages from 14 contributors in 182.961s
[!] 13 vurnerabilities found [4232 packages audited]
severity 2 low | 11 moderate
run 'npm audit' for more detail
and then i tried again to check requirements, and it is gave me same result as:
cordova requirements
it still give me same result like before as
Android Studio project detected
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-27,android-26
Gradle: not installed
Cannot read property 'length' of undefined
(node:2392) UnhandledPromiseRejectionWarning: CordovaError: Some of requirements check failed
at C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\src\cli.js:414:27
at _fulfilled (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
at C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:557:44
at flush (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:2392) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2392) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code
when i check again the version of gradle with type :
gradle -v
it still give the same version as 4.7 with the result :
------------------------------------------------------------
Gradle 4.7
------------------------------------------------------------
Build time: 2018-04-18 09:09:12 UTC
Revision: b9a962bf70638332300e7f810689cb2febbd4a6c
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 1.8.0_162 (Oracle Corporation 25.162-b12)
OS: Windows 7 6.1 amd64
my question is, why the gradle still not installed?
please help me, i dont know how to fix it again.
Thank you !
im use:
cordova : 8.0.0
node :8.11.2
java jdk : 1.8.0
gradle : 4.7
windows 7 64-bit
cordova build
stackoverflow.com/questions/30413485/… – deathangel908check_recks.js:139
. Also, you can create the issue inside to cordova, because when gradle not found Cordova should at least stays so instead of throwing.length
of undefined exception – deathangel908