gradle: not installed (cordova requirements) - java

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 :
+gradle#1.0.9
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

Kindly add path to your system variable. i.e
Open system -> advanced -> Environment Variable
under system variable section click on path and then click on edit button
their add your path to gradle/bin.

Related

Building OpenJDK Panama 19

i wanted to build OpenJDK panama for Windows 11 WSL from site:
uname Linux DESKTOP-LCGGQ32 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
git clone https://github.com/openjdk/panama-foreign
cd panama-foreign
On Windows 11 WSL I tried Commands:
./configure --with-boot-jdk=/mnt/c/Tools/jdk-17 --with-libclang="/mnt/c/Tools/LLVM" --with-toolchain-version=2019
Then
make
it fails on make
as shown below:
Building target 'default (exploded-image)' in configuration 'windows-x86_64-server-release'
Compiling 1 files for BUILD_TOOLS_HOTSPOT
Compiling 8 files for BUILD_TOOLS_LANGTOOLS
<3>init: (11742) ERROR: UtilAcceptVsock:244: accept4 failed 110
<3>init: (11743) ERROR: UtilAcceptVsock:244: accept4 failed 110
make[3]: *** [CompileToolsHotspot.gmk:47: /mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/buildtools/buildtools/hotspot_tools_classes/_the.BUILD_TOOLS_HOTSPOT_batch] Error 255
make[2]: *** [make/Main.gmk:95: buildtools-hotspot] Error 2
make[2]: *** Waiting for unfinished jobs....
make[3]: *** [ToolsLangtools.gmk:37: /mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch] Error 255
make[2]: *** [make/Main.gmk:74: buildtools-langtools] Error 2
ERROR: Build failed for target 'default (exploded-image)' in configuration 'windows-x86_64-server-release' (exit code 2)
=== Output from failing command(s) repeated here ===
* For target buildtools_buildtools_hotspot_tools_classes__the.BUILD_TOOLS_HOTSPOT_batch:
<3>init: (11742) ERROR: UtilAcceptVsock:244: accept4 failed 110
* For target buildtools_langtools_tools_classes__the.BUILD_TOOLS_LANGTOOLS_batch:
<3>init: (11743) ERROR: UtilAcceptVsock:244: accept4 failed 110
* All command lines available in /mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/make-support/failure-logs.
=== End of repeated output ===
No indication of failed target found.
HELP: Try searching the build log for '] Error'.
HELP: Run 'make doctor' to diagnose build problems.
make[1]: *** [/mnt/c/repo/panama-foreign/make/Init.gmk:315: main] Error 2
make: *** [/mnt/c/repo/panama-foreign/make/Init.gmk:186: default] Error 2
Configuration summary:
Name: windows-x86_64-server-release
Debug level: release
HS debug level: product
JVM variants: server
JVM features: server: 'cds compiler1 compiler2 epsilongc g1gc jfr jni-check jvmci jvmti management parallelgc serialgc services shenandoahgc vm-structs zgc'
OpenJDK target: OS: windows, CPU architecture: x86, address length: 64
Version string: 19-internal-adhoc.root.panama-foreign (19-internal)
Source date: Determined at build time
Tools summary:
Environment: wsl2 version 5.10.16.3-microsoft-standard-WSL2, #1 SMP Fri Apr 2 22:23:49 UTC 2021 (Ubuntu 20.04.4 LTS); windows version 10.0.22000.556; prefix "/mnt"; root "\wsl.localhost\Ubuntu-20.04"
Boot JDK: java version "17" 2021-09-14 LTS Java(TM) SE Runtime Environment (build 17+35-LTS-2724) Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing) (at /mnt/c/tools/jdk-17)
Toolchain: microsoft (Microsoft Visual Studio 2019)
C Compiler: Version 19.29.30136 (at /mnt/c/progra~2/micros~2/2019/profes~1/vc/tools/msvc/1429~1.301/bin/hostx86/x64/cl.exe)
C++ Compiler: Version 19.29.30136 (at /mnt/c/progra~2/micros~2/2019/profes~1/vc/tools/msvc/1429~1.301/bin/hostx86/x64/cl.exe)
Build performance summary:
Build jobs: 15
Memory limit: 15858 MB
WARNING: The result of this configuration has overridden an older
configuration. You should run 'make clean' to make sure you get a
proper build. Failure to do so might result in strange build problems.
cat: standard output: No such file or directory
I have looked the failure logs
File1:
buildtools_buildtools_hotspot_tools_classes__the.BUILD_TOOLS_HOTSPOT_batch.cmdline
/mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/fixpath exec /mnt/c/tools/jdk-19/bin/javac.exe -J-XX:+UseSerialGC -J-Xms32M -J-Xmx512M -J-XX:TieredStopAtLevel=1 -g -Xlint:all -source 18 -target 18 -Xlint:-options -implicit:none -Xprefer:source -XDignore.symbol.file=true -encoding ascii -Werror -d /mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/buildtools/buildtools/hotspot_tools_classes #/mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/buildtools/buildtools/hotspot_tools_classes/_the.BUILD_TOOLS_HOTSPOT_batch.filelist
File2:
buildtools_langtools_tools_classes__the.BUILD_TOOLS_LANGTOOLS_batch.cmdline
/mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/fixpath exec /mnt/c/tools/jdk-19/bin/javac.exe -J-XX:+UseSerialGC -J-Xms32M -J-Xmx512M -J-XX:TieredStopAtLevel=1 -g -Xlint:all -source 18 -target 18 -Xlint:-options -implicit:none -Xprefer:source -XDignore.symbol.file=true -encoding ascii -Werror -d /mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/buildtools/langtools_tools_classes #/mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch.filelist
Seems like the problem is because of WSL
https://github.com/microsoft/WSL/issues/6420
But i dont know how to fix this issue for panama.

How can I initialize Gradle projects in non-English systems?

I am trying to use Gradle on my Windows machine. The command I want to be able to use is:
gradle init --type java-application
But here is the error I get when I run this command on Powershell (or cmd):
> Task :init FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':init'.
> The requested build type 'java-application' is not supported. Supported types:
- 'basic'
- 'cpp-application'
- 'cpp-library'
- 'groovy-appl²cat²on'
- 'groovy-gradle-plugin'
- 'groovy-l²brary'
- 'java-appl²cat²on'
- 'java-gradle-plugin'
- 'java-l²brary'
- 'kotlin-appl²cat²on'
- 'kotlin-gradle-plugin'
- 'kotlin-l²brary'
- 'pom'
- 'scala-appl²cat²on'
- 'scala-l²brary'
- 'swift-application'
- 'swift-library'
As seen in the output, there is probably an encoding issue here. Because
java-appl²cat²on
is displayed as a possible type.
I used versions 6.9 and 7.0.2 and the results are the same. My system language is Turkish but I also use Git, Maven etc. without any issues.
Here is the output of gradle --version in case it is useful:
------------------------------------------------------------
Gradle 6.9
------------------------------------------------------------
Build time: 2021-05-07 07:28:53 UTC
Revision: afe2e24ababc7b0213ccffff44970aa18035fc0e
Kotlin: 1.4.20
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 1.8.0_231 (Oracle Corporation 25.231-b11)
OS: Windows 10 10.0 amd64
Update: Issue #17383 has been fixed and is targeted for Gradle 7.2.
You may hit a bug in Gradle. I was able to reproduce the issue by forcing tr-TR locale in environment variable JAVA_TOOL_OPTIONS. I filed a bug in the Gradle issue tracker to have this checked: Build init plugin is locale sensitive.
As a workaround, you could force English locale for project initialization, in Powershell:
PS> $env:JAVA_TOOL_OPTIONS="-Duser.language=en -Duser.country=US"
PS> gradle.bat init --type java-application
Picked up JAVA_TOOL_OPTIONS: -Duser.language=en -Duser.country=US
Select build script DSL:
1: Groovy
2: Kotlin
Enter selection (default: Groovy) [1..2]

Random failure on Hudson for Maven builds

Since migrating to Maven, a lot of Java project builds on Hudson randomly fail with the following error message:
[ERROR] Process did not initiate connection and is still alive; killing it
[ERROR] Failure: hudson.AbortException: Process failed to connect; exit code: 143
ERROR: Process failed to connect; exit code: 143
The build queue is not full. The next build usually works just fine. Any clues on what is happening?
I'm using Hudson version 3.2.1 with Hudson Maven3 Plug-in version 3.0.4
Full log (edited for simplicity/security):
Started by user anonymous
Building on master
Updating {svn path} revision: {date} depth:infinity ignoreExternals: false
At revision {number}
no change for {svn path} since the previous build
[INFO] Using bundled Maven 3 installation
[INFO] Checking Maven 3 installation environment
[workspace] $ {maven home}/mvn --help
[INFO] Checking Maven 3 installation version
[INFO] Detected Maven 3 installation version: 3.1.1
[workspace] $ {maven home}/mvn clean package -V -B -Dmaven.ext.class.path={classpath} -Dhudson.eventspy.port=54304 -f pom.xml
[DEBUG] Waiting for connection on port: 54304
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 12:22:22-0300)
Maven home: {maven home}
Java version: 1.6.0_22, vendor: Sun Microsystems Inc.
Java home: {java home}
Default locale: en_US, platform encoding: ISO-8859-1
OS name: "linux", version: "2.6.18-407.el5", arch: "amd64", family: "unix"
[ERROR] Process did not initiate connection and is still alive; killing it
[ERROR] Failure: hudson.AbortException: Process failed to connect; exit code: 143
ERROR: Process failed to connect; exit code: 143
Sending e-mails to: {e-mail}
[DEBUG] Skipping watched dependency update for build: project-trunk #6 due to result: FAILURE
Finished: FAILURE
Since having random failures defeats the whole purpose of having a continuous integration tool, the answer is moving on to Jenkins for better Maven support.

Java Eclipse IDE ("For Java Developers" Version, Mac, 64-bit) Crashing Upon Launch

As soon as I double-click my Eclipse application (version stated in title), it crashes, and I receive the usual Mac problem report saying "Eclipse Quit Unexpectedly." The first time I downloaded it, I opened it and it worked fine, but when I quit it and reopened it, it crashed like this — I've tried reinstalling and deleting the previous edition, but to no avail. I'm running OS X El Capitan, 10.11, and Java 8, Update 20, and the most recent version of Eclipse — so I'm up to date on everything.
Here Is An Abbreviated Version of the Error Message:
Process: eclipse [23861]
Path: /Applications/Eclipse.app/Contents/MacOS/eclipse
Identifier: org.eclipse.platform.ide
Version: 4.5.1 (4.5.1.M20150904-0015)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: eclipse [23861]
User ID: 501
Date/Time: 2015-11-29 00:10:34.362 -0500
OS Version: Mac OS X 10.11 (15A284)
Report Version: 11
Anonymous UUID: 4F4C24F6-3E2F-BC1B-B0CB-8B2DC6C5D233
Sleep/Wake UUID: 05764FB8-38E6-4010-BED2-53D9C217D124
Time Awake Since Boot: 270000 seconds
Time Since Wake: 4600 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000000000003c
Exception Note: EXC_CORPSE_NOTIFY

Eclipse crashing on boot (Mac)

I am having issues opening Eclipse on my Mac. There is no loading screen, it just crashes instantly after it is booted. Is anyone able to trace the path? This is my first time using Eclipse, so I am not very experienced.
The basic crash log (Shortened):
Process: eclipse [1371]
Path: /Users/USER/Desktop/Eclipse.app/Contents/MacOS/eclipse
Identifier: org.eclipse.platform.ide
Version: 4.4.2 (4.4.2.M20150204-1700)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: eclipse [1371]
User ID: 501
Date/Time: 2015-06-12 19:00:02.778 +0100
OS Version: Mac OS X 10.10.3 (14D136)
Report Version: 11
Anonymous UUID: *********************
Time Awake Since Boot: 9700 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000000000003c
The full log can be found here.
Any help is appreciated. Have a great day folks. :)
There are several solutions for you. You could dual boot windows and install Eclipse and then see if it works. Or you could try other IDEs for example if you are using Eclipse to develop android apps then you could try Android Studio. Or if you are doing java applications then you could try Intellij IDEA.

Categories

Resources