I have a source code which currently I use Java Compiler 1.6 to compile it, I want to use 1.7 version instead, I go to project properties and in Java Compiler section I change "Compiler Compliance" to 1.7, but when I build the project I get an error:
Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use >Android Tools > Fix Project Properties.
When I do its recommendation, It change the compiler to 1.6 again. I'm using Android Development Tool.
Thx
Android SDK does not support JDK 1.7 and thats the reason you are not allowed to use it for Compiler compliance. You need to use JDK 1.6 as mentioned under the System requirements
here:
http://developer.android.com/sdk/index.html
UPDATE From Android Studio 0.3.2 onwards, there seems to be a support for Java 7 features: http://tools.android.com/recent/androidstudio032released
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.