cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karlo Vrbić (JIRA) <j...@apache.org>
Subject [jira] [Created] (CB-14042) Cordova Android not building because Java 10
Date Thu, 19 Apr 2018 10:16:00 GMT
Karlo Vrbić created CB-14042:
--------------------------------

             Summary: Cordova Android not building because Java 10
                 Key: CB-14042
                 URL: https://issues.apache.org/jira/browse/CB-14042
             Project: Apache Cordova
          Issue Type: Bug
          Components: cordova-android
    Affects Versions: cordova-android-7.0.0, 8.0.0
         Environment: |ANDROID_HOME|/home/thekarlo95/Android/Sdk|
|JAVA_HOME|/usr/lib/jvm/java-10-jdk|
|OS|Arch Linux x64|
|Kernel version|4.15.15-1-ARCH|
|Cordova version|8.0.0|
            Reporter: Karlo Vrbić
            Assignee: Joe Bowser


When running {{cordova build android}} I get following error:
{code:java}
(node:11503) UnhandledPromiseRejectionWarning: CordovaError: Requirements check failed for
JDK 1.8 or greater
    at /home/myuser/Projects/cordovaIonicProject/platforms/android/cordova/lib/check_reqs.js:370:19
    at _fulfilled (/home/myuser/Projects/cordovaIonicProject/platforms/android/cordova/node_modules/q/q.js:854:54)
    at self.promiseDispatch.done (/home/myuser/Projects/cordovaIonicProject/platforms/android/cordova/node_modules/q/q.js:883:30)
    at Promise.promise.promiseDispatch (/home/myuser/Projects/cordovaIonicProject/platforms/android/cordova/node_modules/q/q.js:816:13)
    at /home/myuser/Projects/cordovaIonicProject/platforms/android/cordova/node_modules/q/q.js:624:44
    at runSingle (/home/myuser/Projects/cordovaIonicProject/platforms/android/cordova/node_modules/q/q.js:137:13)
    at flush (/home/myuser/Projects/cordovaIonicProject/platforms/android/cordova/node_modules/q/q.js:125:13)
    at process._tickCallback (internal/process/next_tick.js:176:11)
(node:11503) 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:11503) [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.
{code}

I investigated a little bit and it seems that regex at {{./platforms/android/cordova/lib/check_reqs.js}},
line 220 doesnt recognize java version correctly. Problem is that {{javac --version}} outputs
{{javac 10}} instead of assumed {{javac 1.10.0}}. Simple change in regex would fix this.





--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message