我正在为 Google Glass 开发 Glassware。我想看看我是否可以将 Glassware 上传到 App Engine,所以我得到了支持 App Engine 的最新版本(位于 GitHub 上:https ://github.com/googleglass/mirror-quickstart-java/releases/tag/app -引擎)。我更改了 API 代码和我的 App Engine 应用程序名称,并使用 Eclipse 上的 Google App Engine SDK 和 appcfg.cmd 通过命令提示符将其部署到 App Engine。部署它时,我收到以下错误:
Failed to compile the generated JSP java files to App Engine
我得到的完整错误如下(这是来自它的命令提示符版本):
warning: Supported source version 'RELEASE_6' from annotation processor 'com.goo
gle.appengine.tools.compilation.DatastoreCallbacksProcessor' less than -source '
1.7'
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:7: error: package com.google.api.services.mirror.model does not exist
import com.google.api.services.mirror.model.Contact;
^
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:11: error: package com.google.api.services.mirror.model does not exist
import com.google.api.services.mirror.model.TimelineItem;
^
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:12: error: package com.google.api.services.mirror.model does not exist
import com.google.api.services.mirror.model.Subscription;
^
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:13: error: package com.google.api.services.mirror.model does not exist
import com.google.api.services.mirror.model.Attachment;
^
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:7: error: package com.google.api.services.mirror.model does not exist
import com.google.api.services.mirror.model.Contact;
^
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:11: error: package com.google.api.services.mirror.model does not exist
import com.google.api.services.mirror.model.TimelineItem;
^
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:12: error: package com.google.api.services.mirror.model does not exist
import com.google.api.services.mirror.model.Subscription;
^
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:13: error: package com.google.api.services.mirror.model does not exist
import com.google.api.services.mirror.model.Attachment;
^
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:69: error: cannot find symbol
Contact contact = MirrorClient.getContact(credential, MainServlet.CONTACT_NAME
);
^
symbol: class Contact
location: class index_jsp
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:69: error: cannot access Contact
Contact contact = MirrorClient.getContact(credential, MainServlet.CONTACT_NAME
);
^
class file for com.google.api.services.mirror.model.Contact not found
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:71: error: cannot find symbol
List<TimelineItem> timelineItems = MirrorClient.listItems(credential, 3L).getI
tems();
^
symbol: class TimelineItem
location: class index_jsp
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:71: error: cannot access TimelineListResponse
List<TimelineItem> timelineItems = MirrorClient.listItems(credential, 3L).getI
tems();
^
class file for com.google.api.services.mirror.model.TimelineListResponse not f
ound
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:74: error: cannot find symbol
List<Subscription> subscriptions = MirrorClient.listSubscriptions(credential).
getItems();
^
symbol: class Subscription
location: class index_jsp
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
Index.jsp 位于此处:https ://github.com/googleglass/mirror-quickstart-java/blob/8a7edd5eb8c2710b841294ca5d7d69bd176693bf/web/index.jsp
由于某种原因,mirror.model jar 旁边有一个奇怪的源图标。其他罐子都没有。它的图片如下:我可能会从另一个地方得到这个罐子吗?
另外,有人建议添加
<packaging>war</packaging>
到 pom.xml。这也没有解决问题,它与我之前遇到的错误相同。
我不知道为什么会收到此错误。JSP 文件似乎有问题,但这是 Glass 团队发布的版本。也许我需要改变其中的一些东西?也许是某些罐子有问题?谢谢您的帮助。