简体   繁体   English

创建App Engine连接的Android项目失败

[英]Failed Creating App Engine Connected Android Project

I am trying to create 'App Engine Connected Android Project' on Eclipse 4.2(Juno) but am facing 2 errors: 我正在尝试在Eclipse 4.2(Juno)上创建“App Engine Connected Android Project”,但我遇到了2个错误:

1) The first error shows up while creating new project: 1)创建新项目时出现第一个错误:

Creation of Element Failed.
Reason:
Unknown protocol : d

And yet new project files are created in workspace under project's name. 然而,在项目名称下的工作空间中创建了新的项目文件。 I have installed latest Google plugin for Eclipse, ADT and Android Platform tools. 我已经为Eclipse,ADT和Android平台工具安装了最新的Google插件。 I am not facing any problem while creating 'Android Application' project but while creating 'App Engine Connected Android Project' Eclipse is showing me this error. 我在创建“Android应用程序”项目时没有遇到任何问题,但在创建“App Engine Connected Android Project”时,Eclipse正在向我显示此错误。

2) I can see the newly created project files in workspace but there is one error in MainActivity.java file under src folder saying: RegisterActivity cannot be resolved to a type 2)我可以在工作区中看到新创建的项目文件,但是在src文件夹下的MainActivity.java文件中有一个错误: RegisterActivity cannot be resolved to a type

I am working on Win7 Professional 64bit and Eclipse 4.2(32bit). 我正在使用Win7 Professional 64位和Eclipse 4.2(32位)。

Did I forget to install any plugins? 我忘了安装任何插件吗? What should I do? 我该怎么办?

I had a similar problem. 我遇到了类似的问题。 What you can do is right-click on your android project, Google > Generate AppEngine Backend . 您可以做的是右键单击您的Android项目, Google> Generate AppEngine Backend The AppEngine project will automatically be created. 将自动创建AppEngine项目。

Then, on AppEngine project you can right click, Google > Generate Cloud Endpoint Client Library to create Endpoints. 然后,在AppEngine项目中,您可以右键单击Google> Generate Cloud Endpoint Client Library来创建端点。 if you still get RegisterActivity cannot be resolved to a type error, please change your java compiler to 1.6. 如果仍然RegisterActivity cannot be resolved to a type错误,请将您的java编译器更改为1.6。

It worked for me. 它对我有用。

This is not really an answer but too long for a comment. 这不是一个真正的答案,但对于评论来说太长了。

I see some comments above suggesting that user shouldn't be using "App Engine Connected Android Project". 我看到上面的一些评论表明用户不应该使用“App Engine Connected Android Project”。

That was my impression too, but now I'm not sure. 这也是我的印象,但现在我不确定。 It is still prominent in the docs (with a last updated of February 14, 2013), it says nothing about being deprecated, and I found a post from August saying that they only removed it temporarily and would be adding it back again (with GCM support). 它在文档中仍然很突出(最后更新时间为2013年2月14日),它没有提及被弃用的内容,我发现8月份的帖子说他们只是暂时删除它并将其重新添加(使用GCM)支持)。

It appears that they updated it for Endpoints and GCM, and it is still alive. 看起来他们为端点和GCM更新了它,它仍然存在。 It is an alternative to creating a Android project and then using "Generate AppEngine Backend" wizard. 它是创建Android项目然后使用“Generate AppEngine Backend”向导的替代方法。

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

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