- edited description
Use source 1.7 or higher
I am getting this error in few source libraries for Android that I am using:
diamond operator is not supported in -source 1.5 (use -source 7 or higher to enable diamond operator)
(Alt-Enter shows hints)
See here for a possible solution for normal Java projects: http://goo.gl/JfWkGD
Since NBAndroid has no Binary/Source format selection, one cannot change this.
Please suggest a solution to this, or better yet, give an option to select the format.
Thanks.
Comments (13)
-
reporter -
reporter - edited description
-
reporter - edited description
-
reporter - edited description
-
Put
java.source=1.7 java.target=1.7
into
ant.properties
in your project directory and it will be built with 1.7. Unfortunately the IDE will show errors until I fix the bug that this source level is not recognized. -
reporter This workaround I already figured out myself. I was hoping, however, that the errors don't show at all...
Do you have an estimate @radim when you'd fix it?
-
No ETA because this is a problem in NetBeans Java parsing support - https://netbeans.org/bugzilla/show_bug.cgi?id=243701 We will have to wait for an update there. Hopefully it will be part of some 8.0.x patch.
-
- changed status to resolved
claimed to be fixed in NetBeans 8.0.1
-
Account Deleted How is it about java 8 support now? Putting java.source=1.8 java.target=1.8 or java.source=8 java.target=8 into the ant.properties doesnt work.
-
Re Java 8 support: There are two parts to it: 1. Android runtime has to be able to use this output and 2. the project/IDE support has to produce it. I think (1.) is not ready yet. I am not even sure if 1.7 is fully supported including features like ARM.
If you can get it working from command line I will take a look to see how to enable this in the IDE. BTW: perhaps it deserves a separate issue in such case.
-
Account Deleted Well that sucks. I have a fully working game written in Java8 and can't port it to android now unless I rewrite every single lambda expression etc. I dont see the problem why Java8 is not working on Android phones yet. One of java's big advantages is the "platform independency" and now such shit happens. -.-
-
@radim Shows an error in editor, however build.xml is edited and using source 1.7
-
Re Java 8: you are barking up the wrong tree here.
@synaps source level for IDE project is inferred from java.source property in one of properties files. Commonly it is in
ant.properties
- Log in to comment