简体   繁体   English

如何设置compileSDKversion以支持Java 1.6

[英]How can I set my compileSDKversion to support Java 1.6

I get the error: 我得到错误:

Error:(3, 22) compileSdkVersion android-22 requires compiling with JDK 7

I am using a Mac running OSX 10.6 so JDK 7 isn't supported. 我使用的是运行OSX 10.6Mac因此不支持JDK 7 Is there a way I can change the compileversion to one that can use JDK 6 ? 有什么办法可以将compileversion更改为可以使用JDK 6 Any help would be great. 任何帮助都会很棒。

If you set your target android sdk version to 21 or above it will require Java 7. 如果您将目标android sdk版本设置为21或更高版本,则将需要Java 7。

If you cannot use JDK 7 you can set your target sdk version to 20 or below. 如果您不能使用JDK 7,则可以将目标sdk版本设置为20或更低。 However, I would caution against this, if you are going to be building apps that will be in distributed on the play store it is a good idea to be using Java 7 and targeting version 21. 但是,对此我要特别注意,如果您要构建将在Play商店中分发的应用程序,则最好使用Java 7并定位到版本21。

You can see more information about upgrading to using JDK 7 here 您可以在此处查看有关升级到使用JDK 7的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM