我刚刚开始使用android(Java)探索app引擎,我按照链接教我如何创建App Engine Connected Android Project。 https://developers.google.com/eclipse/docs/endpoints-androidconnected-gae
我完全遵循了链接中写的内容,
1)创建了一个连接android项目的新app引擎
2)从https://code.google.com/apis/console/#project
获取项目编号和API密钥3)在Google API控制台中启用Google Cloud Messaging
4)在CloudEndpoints类
中将LOCAL_ANDROID_RUN设置为true5)使用了谷歌api的模拟器(v17)
6)从android sdk manager
安装了android云消息库7)我正在使用eclipse indigo
我在RegisterActivity.java
中遇到了这些错误import messageEndpoint.MessageEndpoint;
import messageEndpoint.CollectionResponseMessageData;
import messageEndpoint.MessageData;
我在GCMIntentService.java
中得到了这些行的错误import com.tez.deviceinfoendpoint.Deviceinfoendpoint;
import com.tez.deviceinfoendpoint.Deviceinfoendpoint.Builder;
import com.tez.deviceinfoendpoint.model.DeviceInfo;
和那样的错误:
无法将Deviceinfoendpoint解析为GCMIntentService.java类型 MessageEndpoint无法解析为RegisterActivity.java类型
我该怎么办?
答案 0 :(得分:1)
右键点击应用引擎项目,然后选择Google - >生成云端点客户端库。清理项目并刷新。它应该工作。
答案 1 :(得分:0)
虽然我不太确定错误堆栈的原因,但我们鼓励右键单击app-engine项目,然后按照上面的建议选择生成云端点。但是,如果您非常需要自己创建端点,则必须确保将以下类似条目添加到webapp目录中的web.xml中。
<param-name>services</param-name>
<param-value>${package}.MyEndpoint</param-value>
确认上述条目后,
否则,如果您正在使用生产服务器,
如果问题出在通过您创建的新端点公开的新端点/服务上,希望这可能对您有所帮助。谢谢!