Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Annotation are only available for java 1.5 and greater when generating Google App Engine Backend(JDK 1.8, new ADT installed)

I installed fresh ADT: http://developer.android.com/sdk/index.html?hl=sk Then I installed:

enter image description here

When I got into the Eclipse readme directory there is:

Eclipse Project Release Notes

Release 4.3.0 Last revised May 29th, 2013

I created fresh Android application then right clicked on it->Google->Generate Google App Engine Backend and this is what I got:

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

How to deal with that? EDIT:

enter image description here

like image 528
Yoda Avatar asked May 15 '14 10:05

Yoda


2 Answers

I tried below and it helped.

  1. Tick the checkbox named Use default compliance settings as in highlighted section (blue color) of image below.
  2. If that didn't help, try changing the Compiler compliance level to different level, press apply and then back again.

enter image description here

like image 156
kiranpradeep Avatar answered Nov 13 '22 09:11

kiranpradeep


For me Enable Project Specific Settings check box was not selected. I selected it and clean the project through Project menu.

like image 3
Shrivatsa Avatar answered Nov 13 '22 10:11

Shrivatsa