java - 生成 Google App Engine 后端(JDK 1.8,安装了新的 ADT)时,注释仅适用于 java 1.5 及更高版本

标签 java android eclipse google-app-engine

我安装了新的 ADT:http://developer.android.com/sdk/index.html?hl=sk 然后我安装了:

enter image description here

当我进入 Eclipse 自述文件目录时,有:

Eclipse Project Release Notes

Release 4.3.0 Last revised May 29th, 2013

我创建了新的 Android 应用程序,然后右键单击它->Google->生成 Google App Engine 后端,这就是我得到的:

Description Resource    Path    Location    Type
The import android.os.Build is never used   MainActivity.java   /A/src/com/uniquebullshit/a line 12 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  MessageData.java    /A-AppEngine/src/com/uniquebullshit/a   line 22 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 21 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  MessageData.java    /A-AppEngine/src/com/uniquebullshit/a   line 28 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 21 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  MessageData.java    /A-AppEngine/src/com/uniquebullshit/a   line 29 Java Problem
The import android.support.v7.app.ActionBar is never used   MainActivity.java   /A/src/com/uniquebullshit/a line 4  Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  DeviceInfo.java /A-AppEngine/src/com/uniquebullshit/a   line 25 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  DeviceInfo.java /A-AppEngine/src/com/uniquebullshit/a   line 33 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 46 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 46 Java Problem
Syntax error, parameterized types are only available if source level is 1.5 or greater  MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 98 Java Problem
The method setMaxResults(int) in the type Query is not applicable for the arguments (Integer)   MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 95 Java Problem
Syntax error, parameterized types are only available if source level is 1.5 or greater  MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 112    Java Problem
Syntax error, 'for each' statements are only available if source level is 1.5 or greater    MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 105    Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 127    Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 126    Java Problem
The method listDeviceInfo(String, Integer) in the type DeviceInfoEndpoint is not applicable for the arguments (null, int)   MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 142    Java Problem
Syntax error, parameterized types are only available if source level is 1.5 or greater  MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 142    Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 74 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 73 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 76 Java Problem
Syntax error, parameterized types are only available if source level is 1.5 or greater  MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 75 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 77 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 76 Java Problem
Syntax error, parameterized types are only available if source level is 1.5 or greater  MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 81 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 77 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 140    Java Problem
Type mismatch: cannot convert from Object to DeviceInfo DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 143    Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 119    Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 139    Java Problem
Type mismatch: cannot convert from Object to DeviceInfo DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 154    Java Problem
There was a problem generating the API metadata for your Cloud Endpoints classes: com.google.api.server.spi.config.ApiConfigException: class com.uniquebullshit.a.MessageEndpoint has no @Api annotation.   A-AppEngine     Unknown Google App Engine Cloud Endpoints Problem Marker
Type mismatch: cannot convert from element type Object to DeviceInfo    MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 144    Java Problem
Syntax error, 'for each' statements are only available if source level is 1.5 or greater    MessageEndpoint.java    /A-AppEngine/src/com/uniquebullshit/a   line 144    Java Problem
Syntax error, parameterized types are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 33 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 34 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 31 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 32 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 35 Java Problem
Syntax error, parameterized types are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 39 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 34 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 35 Java Problem
Syntax error, 'for each' statements are only available if source level is 1.5 or greater    DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 60 Java Problem
Syntax error, parameterized types are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 65 Java Problem
The method setMaxResults(int) in the type Query is not applicable for the arguments (Integer)   DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 51 Java Problem
Syntax error, parameterized types are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 54 Java Problem
Type mismatch: cannot convert from Object to DeviceInfo DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 82 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 97 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 77 Java Problem
Syntax error, annotations are only available if source level is 1.5 or greater  DeviceInfoEndpoint.java /A-AppEngine/src/com/uniquebullshit/a   line 78 Java Problem

如何处理? 编辑:

enter image description here

最佳答案

我在下面进行了尝试,它有所帮助。

  1. 勾选名为 Use default compliance settings 的复选框,如下图突出显示的部分(蓝色)。
  2. 如果这没有帮助,请尝试将 Compiler compliance level 更改为不同的级别,按应用然后再返回。

enter image description here

关于java - 生成 Google App Engine 后端(JDK 1.8,安装了新的 ADT)时,注释仅适用于 java 1.5 及更高版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23675452/

相关文章:

java - 我如何让textarea返回字符串的数组列表,而不只是字符串

android - 使用最新的Android SDK,仍然有适用于Android 1.5的Google Apis构建目标吗?

android - Intent 和 bundle 关系

eclipse - Eclipse 中缺少服务器配置

java - 需要帮助来创建利用方法注释中的值的特定切入点

java - Java 中的 Groovy 语法检查

java - Java中的线程同步

android - ImageView Android图像资源调整大小

java - 即使发生其他操作,在 jtextarea 中显示控制台输出

java - Maven war 插件 - 包括 WAR 中的其他文件