Gradle in the mac's idea, build sync failed - macos

Created a gradle project with idea2017 for mac, when refresh all gradel projects, build:sync failed
java version: 1.8.0
gradle version: 4.4
Error: Could not find or load main class .Library.Java.JavaVirtualMachines.jdk1.8.0_152.jdk.Contents.Home
How can I build it?
Thanks.
I have already set JAVA_HOME

Related

How to fix sonar plugin issue in jenkins

How to avoid issue with sonar scanner plugin on Jenkins 2.289.2, plugin sonar 2.13.1
when compiling a project I got the error
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar (default-cli) on project maven-project:
Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar failed:
An API incompatibility was encountered while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar: java.lang.UnsupportedClassVersionError:
org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 55.0),
this version of the Java Runtime only recognizes class file versions up to 52.0
It looks like an issue with the version of java but I would like to avoid changing my java version
Probably the compiled code you trying to run was compiled using java 11, but in env installed only java 8.
Try to install java 11 and make sure to update OS environment settings to point to the new JDK.
Java Details:
Java 8 uses major version 52
Java 11 uses major version 55

Importing Grails project to IntelliJ IDEA using Gradle fails

When importing a Grails 3+ project to IntelliJ IDEA Ultimate, the Gradle build stops at “Starting Gradle Daemon...”.
Screenshot of IntelliJ build window
This happens when a new Grails 3 project is created using the command “grails create-app projectName” and imported to IntelliJ IDEA using Gradle.
My system configuration:
macOS Catalina
IntelliJ IDEA Ultimate 2020.1
Java 8
Grails 3.3.5
Groovy 2.4.15
The Gradle build fails with no other error messages.
“gradle”, “./gradlew”, “./gradlew bootRun” commands work as expected on the terminal.
Check the Gradle JVM which is set for project and make sure it is compatible for the Gradle version used in project:
Try setting different JDKs including the 1.8 JDK there.

i try to use map view in my flutter app and got some errors

i try to use map view in my flutter project and when i run the app i got some errors :
Error running Gradle:
ProcessException: Process "E:\flutterProjects\flutter_course\android\gradlew.bat" exited abnormally:
Configure project :map_view
WARNING: The specified Android SDK Build Tools version (27.0.3) is ignored, as it is below the minimum supported version (28.0.3) for
Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '27.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin
now has a default version of the build tools.
FAILURE: Build failed with an exception.
What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.2.51 and higher. Project 'android' is using version 1.1.2-4.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get fullinsights.
Get more help at https://help.gradle.org
BUILD FAILED in 15s
Command: E:\flutterProjects\flutter_course\android\gradlew.bat >app:properties
Please review your Gradle project setup in the android/ folder.

Unable to add gradle wrapper task to old project due to, version too old error

I need assistance to add a wrapper to an old gradle (v2.12) project, but I'm unable to run the wrapper tasks due to the following error:
Failed to apply plugin [class 'fi.jasoft.plugin.GradleVaadinPlugin']
Your gradle version (4.2.1) is too old. Plugin requires Gradle 2.0+
According to the error, I need to upgrade my gradle version, yet I have version 4.2.1 installed locally. Is there anyway to run the wrapper task with a specific version?
Gradle 4.2.1
Build time: 2017-10-02 15:36:21 UTC
Revision: a88ebd6be7840c2e59ae4782eb0f27fbe3405ddf
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_40 (Oracle Corporation 25.40-b25)
OS: Mac OS X 10.12.6 x86_64
Edit:
Tried using --gradle-version
| => gradle wrapper --gradle-version 2.12
Configure project :
Root version lmichelson
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_an2u3e8kk42wdypa8wwdzfqcs$_run_closure6.doCall(/projects/maia/build.gradle:240)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
FAILURE: Build failed with an exception.
Where:
Script '/projects/maia/webapp/vaadin.plugin.0.10.7' line: 79
What went wrong:
A problem occurred evaluating script.
Failed to apply plugin [class 'fi.jasoft.plugin.GradleVaadinPlugin']
Your gradle version (4.2.1) is too old. Plugin requires Gradle 2.0+
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 2s
Thanks to the link and answer from #Opal, I solved the issue by
Installing SDKMAN
Downgrading my local gradle version to 2.12: sdk install gradle 2.12
Run the wrapper command
Restore my local version to 4.2.1: sdk install gradle 4.2.1

cannot build cuba platform

I am unable to build the cuba platform plugin I am assuming because gradle cannot download the necessary artifacts. I set the proxy:
gradle -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8118
gradle -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=8118
However, it still fails:
Am I missing something?
I must use gradlew which uses 3.1, version 3.1 does NOT work.

Resources