首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >注册终结点Server...FAILED!(模拟器起作用了,手机不行)

注册终结点Server...FAILED!(模拟器起作用了,手机不行)
EN

Stack Overflow用户
提问于 2013-12-28 02:29:31
回答 1查看 2.3K关注 0票数 0

Intent =新的Intent(this,RegisterActivity.class);startActivity( intent );

(我确实将LOCAL_ANDROID_RUN更改为false)

该错误意味着有一些端点服务器在http://10.0.2.2:8080上运行,这是我不希望看到的,因为我并不真正理解端点服务在哪里运行。它是在本地手机上运行还是在云上的某个地方运行?

我相信生成的App Engine代码会通过Maven appengine:update发送到Google

我错过了什么,谢谢-a

更新(上午11:24)

执行:添加到-AppEngine/target/generated-sources/appengine-endpoints中的安卓Studio>tools>Google云Tools>生成客户端库等

这改变了电话里发生的事情。仍然存在注册错误,但现在显示:

2)注册端点Server...FAILED!无法将您的设备注册到在https://.appspot.com/_ah/api上运行的云端点服务器

电话上出现相同错误(无法将您的设备注册到您的云端点服务器)

更新(下午1:39)在手机上运行应用程序时获得logcat信息,通过USB连接到计算机,看起来像是404未找到错误(?)

代码语言:javascript
复制
12-27 13:36:51.942      609-703/? I/InputDispatcher﹕ Delivering touch to: action: 0x1
12-27 13:36:52.412  19103-19103/sic.example.db7 W/AbstractGoogleClient﹕ Application name is not set. Call Builder#setApplicationName.
12-27 13:36:52.412  19103-19246/sic.example.db7 E/GCMRegistrar﹕ internal error: retry receiver class not set yet
12-27 13:36:53.253  19103-19246/sic.example.db7 E/sic.example.db7.GCMIntentService﹕ Exception received when attempting to register with server at https://core-phoenix-441.appspot.com/_ah/api/
com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found
Not Found
        at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:111)
        at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:38)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:312)
        at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1042)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
        at sic.example.db7.GCMIntentService.onRegistered(GCMIntentService.java:158)
        at com.google.android.gcm.GCMBaseIntentService.handleRegistration(GCMBaseIntentService.java:296)
        at com.google.android.gcm.GCMBaseIntentService.onHandleIntent(GCMBaseIntentService.java:197)
        at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:137)
        at android.os.HandlerThread.run(HandlerThread.java:61)
EN

回答 1

Stack Overflow用户

发布于 2014-03-22 03:04:32

模拟器可以访问,因为它在本地运行,您的手机没有访问计算机本地主机的权限。要做到这一点,你可以检查Codiak答案。

https://stackoverflow.com/a/16097253/1368396

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20805878

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档