I am using jdk 11.0.6 and gradle alone with javaFX plugin. When running the program, intellij gives me the error
4:46:44 PM: Executing task 'run'...
> Configure project :
Found module name 'Notes'
> Task :compileJava FAILED
C:\Users\fahid\IdeaProjects\Notes\src\main\java\module-info.java:1: error: modules are not supported in -source 8
module Notes {
^
(use -source 9 or higher to enable modules)
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* 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 full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
1 actionable task: 1 executed
4:46:45 PM: Task execution finished 'run'.
How can I fix it?
note- I have selected jdk 11 in both project structure and module section.(Screenshot).
Related
I have been facing this error for 2 days on Linux(Ubuntu 20.04) machine, and I have tried almost every possible solution found on stack-overflow and git-hub but I could'not resolve this. Any idea about this error?
Task :app:compileDebugJavaWithJavac
Task :app:mergeDebugJavaResource FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
217 actionable tasks: 3 executed, 214 up-to-date
Note: /home/fareed/Data/Office/Alfabolt/DeNaio-Mobile-App/android/app/src/debug/java/com/denaio/ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Failed to transform bcprov-jdk15on-1.69.jar (org.bouncycastle:bcprov-jdk15on:1.69) to match attributes {artifactType=android-java-res, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for JetifyTransform: /home/fareed/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.69/91e1628251cf3ca90093ce9d0fe67e5b7dab3850/bcprov-jdk15on-1.69.jar.
> Failed to transform '/home/fareed/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.69/91e1628251cf3ca90093ce9d0fe67e5b7dab3850/bcprov-jdk15on-1.69.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 59. (Run with --stacktrace for more details.)
Suggestions:
- Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
- If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).
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 full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 24s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Note: /home/fareed/Data/Office/Alfabolt/DeNaio-Mobile-App/android/app/src/debug/java/com/denaio/ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Failed to transform bcprov-jdk15on-1.69.jar (org.bouncycastle:bcprov-jdk15on:1.69) to match attributes {artifactType=android-java-res, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for JetifyTransform: /home/fareed/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.69/91e1628251cf3ca90093ce9d0fe67e5b7dab3850/bcprov-jdk15on-1.69.jar.
> Failed to transform '/home/fareed/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.69/91e1628251cf3ca90093ce9d0fe67e5b7dab3850/bcprov-jdk15on-1.69.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 59. (Run with --stacktrace for more details.)
Suggestions:
- Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
- If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).
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 full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 24s
at makeError (/home/fareed/Data/Office/Alfabolt/DeNaio-Mobile-App/node_modules/execa/index.js:174:9)
at /home/fareed/Data/Office/Alfabolt/DeNaio-Mobile-App/node_modules/execa/index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (/home/fareed/Data/Office/Alfabolt/DeNaio-Mobile-App/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:5)
at async Command.handleAction (/home/fareed/Data/Office/Alfabolt/DeNaio-Mobile-App/node_modules/react-native/node_modules/#react-native-community/cli/build/index.js:186:9)
Full error:
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\romario\git\trials\meo\platforms\tempPlugin\core\build.gradle' line: 6
What went wrong:
A problem occurred evaluating root project 'core'.
Failed to apply plugin 'com.android.internal.library'.
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.
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 full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1s
Failed to build plugin #nativescript/core :
Error: Command gradlew.bat failed with exit code 1
notes
I am running java 11
After the update of my Flutter project to JAVA 11 suddenly I got this error when I try to run the app on any device.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileQa4DebugJavaWithJavac'.
> Could not resolve all files for configuration ':app:androidJdkImage'.
> Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for JdkImageTransform: /Users/enzoftware/Library/Android/sdk/platforms/android-30/core-for-system-modules.jar.
> jlink executable /Applications/Android Studio Preview.app/Contents/jre/jdk/Contents/Home/bin/jlink does not exist.
* 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 full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 56s
Exception: Gradle task assembleQa4Debug failed with exit code 1
I tried doing flutter clean, install again the SDK for API 30 and reinstalling everything from scratch but the problem persist.
Any suggestions are welcome.
Change version of JAVA 8 because JAVA 11 isn't good for using Flutter. I was on sam
Compiler message
../../../../Android/flutter_linux_v1.12.13+hotfix.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-1.1.3/lib/src/cached_network_image_provider.dart:42:24:
Error: The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'.
Method
ImageStreamCompleter load(CachedNetworkImageProvider key) {
^
../../../../Android/flutter_linux_v1.12.13+hotfix.5-stable/flutter/packages/flutter/lib/src/painting/image_provider.dart:403:24:
Context: This is the overridden method ('load').
ImageStreamCompleter load(T key, DecoderCallback decode);
^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.
FAILURE:
Build failed with an exception.
* Where:
Script '/home/omelnour/Android/flutter_linux_v1.12.13+hotfix.5-stable/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 780
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/home/omelnour/Android/flutter_linux_v1.12.13+hotfix.5-stable/flutter/bin/flutter'' finished with non-zero exit value 1
* 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 full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 7s
Finished with error: Gradle task assembleDebug failed with exit code 1
This is the problem with older version of cached_network_image Just update to the latest version of cached_network_image
which is 2.0.0, so in your pubspec.yaml file where you have
cached_network_image: ^1.1.3 change 1.1.3 with 2.0.0.
So my spring project on eclipse was working fine, I returned to my project a week ago and for some reason there are squiggly red lines every where, saying cannot resolve type all over the whole project. I have tried everything on the internet and dont know the way forward now.
This is what I see when I run gradle
Working Directory: /Users/deso/Documents/workspace-sts-3.9.1.RELEASE/dohinventoryfordoh
Gradle user home: /Users/deso/.gradle
Gradle Distribution: Gradle wrapper from target build
Gradle Version: 4.6
Java Home: /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home
JVM Arguments: None
Program Arguments: None
Build Scans Enabled: false
Offline Mode Enabled: false
Gradle Tasks: build
:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':compileClasspath'.
> Could not find org.springframework.boot:spring-boot-starter-aop:.
Required by:
project :
> Could not find org.springframework.boot:spring-boot-starter-data-jpa:.
Required by:
project :
> Could not find org.springframework.boot:spring-boot-starter-web:.
Required by:
project :
> Could not find org.springframework.hateoas:spring-hateoas:.
Required by:
project :
* 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 full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
1 actionable task: 1 executed