How to resolve invalid source release error in intellij - intellij-idea

I am using Intellij and I am trying to run a simple hello world android application. But i get the following error.
Error:java: invalid source release: 8
What could be the problem, any help?
Thanks in advance!

Android only supports java 7 so I assume that somewhere in your gradle/Intellij settings java 8 as source version is set. See this answer for more information: Which JDK version (Language Level) is required for Android Studio?

Related

chirp-react-native run-android failing for Java 11 and 12?

Tried to build chirp-react-native with Java 12 and Java 11. Will not build.
If I drop down to Java 1.8 AND set my gradle distributionUrl to gradle-4.8-all.zip in chirp-react-native/android/gradle/wrapper/gradle-wrapper.properties, the package compiles and installs correctly and I think it runs correctly.
However if it's an easy fix I'd prefer to use a current JDK. Has anyone successfully built chirp-react-native using Java 12?
Steps to reproduce:
With Java 12 set in my JAVA_HOME env variable (/Library/Java/JavaVirtualMachines/jdk12-0.1.jdk)
react-native run-android fails with this error:
Could not determine Java version from 12.0.1
If I drop down to Java 11 as JAVA_HOME, I get a similar error message:
Could not determine Java version from 11.0.3
With Java 1.8 and Gradle 4.8, everything appears to build, install and run properly.
This comment describes the reason for this error - https://github.com/facebook/react-native/issues/22487#issuecomment-443759776
You might be able to upgrade the gradle version in the android/build.gradle file.
Can you try to run ./gradlew build from the command line and check for additional log messages in console? It might be that there are some missing dependencies required by your project. What is happening if you remove ChirpSDK from the project? Can you build it with Java 11/12 and without ChirpSDK?

WSO2 Developer Studio Nullpointer exception

I am using WSO2 Developer Studio latest version 3.8.0 on Mac OS High Sierra. Each time when I drag and drop element from the tool pallet into the design workspace, It shows Null pointer exception. Also canvas title is not visible. Here below I attached a screenshot. So much appreciate your help.
Nullpointer exception
I also face similar issue since I install both Oracle JDK 8 and JDK 10. Eclipse take latest JDK 10 version, but application does not support Java 10. To select Java version to use, I added following line into the /Applications/Eclipse.app/Contents/Eclipse/eclipse.ini file. Then it work fine.
-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/bin
If you are using Java 10 then you can remove it and install Java 8 or you can use both version and update eclipse.ini file to point JDK 8 version.
Hope this will be helpful.

objectaid uml explorer throwing exception

I have installed ObjectAid UML explorer in Eclipse Juno 4.2.2. Throws the following error when I launch it.
The selected wizard could not be started.
Plug-in com.objectaid.uml.cls was unable to load class com.objectaid.uml.cls.editor.NewClassDiagramWizard.
JVMCFRE003 bad major version;
Appreciate your insights and help. Thanks.
'Bad major version' means the code was compiled for a newer version of Java that the one you are using.
According to the ObjectAid download page the current 1.2.x releases require Java 8.
Use the older 1.1.x release if you are using Java 6 or 7.

IntelliJ IDEA Ultimate - Opening Error Mac: java.lang.IllegalArgumentException

Installed the IntelliJ IDEA Ultimate and tried to open it but receive the error below (see code section). I am using macOS Sierra (Version 10.12.6) and installed IntelliJ IDEA Version 2017.3.3.
Can someone tell me how to solve this issue?
Many thanks.
Internal error. Please report to http://jb.gg/ide/critical-startup-errors java.lang.IllegalArgumentException: Width (0.0) or height (0.0) cannot be <= 0
at sun.awt.image.MultiResolutionCachedImage.checkSize(MultiResolutionCachedImage.java:79)
at sun.awt.image.MultiResolutionCachedImage.getResolutionVariant(MultiResolutionCachedImage.java:63)
at sun.awt.image.MultiResolutionCachedImage.getBaseImage(MultiResolutionCachedImage.java:122)
at java.awt.image.AbstractMultiResolutionImage.getWidth(AbstractMultiResolutionImage.java:69)
[[[... error continues ...]]]
I just restrated the system and - all of a sudden - it worked. (Please make also sure that you have the newest Java installed).

Error in adding the Apache CFX run time in eclipse

I am newbie to web services. i am trying to generate stubs using Apache CFX on eclipse. when i try to add CFX in preferences using Windows >> Preference eclipse gives error "Invalid Type Name". i tried to change the JRE from JDK 6 to 7. change the versions of CFX but still problem persists.
Please help in resolve the problem
I found the solution. The problem because of multiple java version installed on my machine and CFX found two different versions of JAXB. I uninstalled java 7 from my machine and then it worked with java 6.