问题
Android SDK requirements state that either JDK 5 or JDK 6 is required.
However, I have a Java class library written in Java 7 and I would like to use it for my Android project.
Instead of manually converting Java 7 to Java 6 by hand, I was wondering if anyone know of a converter that could do this job for me?
Or do we have to code one up from scratch?
回答1:
Do you have the source for the JAR? If so, you can use the javac -target
parameter set to either 5 or 6 to generate either Java 5 or 6 class files. See this page.
来源:https://stackoverflow.com/questions/8869869/is-there-a-java-7-to-java-6-converter