0

我用Creating an App Engine Connected Android Project使用eclipse,並將LOCAL_ANDROID_RUN更改爲true。我搜索了這個錯誤,好像在web應用程序運行配置中的端口之前添加--address = 0.0.0.0會使其工作,但它沒有,所以幫助?Google雲消息端點註冊失敗本地

logcat的

04-01 19:43:27.524: E/com.imagine.GCMIntentService(2120): Exception received when attempting to register with server at http://10.0.2.2:8888/_ah/api/ 
04-01 19:43:27.524: E/com.imagine.GCMIntentService(2120): com.google.api.client.googleapis.json.GoogleJsonResponseException: 503 Service Unavailable 
04-01 19:43:27.524: E/com.imagine.GCMIntentService(2120): { 
04-01 19:43:27.524: E/com.imagine.GCMIntentService(2120): "code" : 503, 
04-01 19:43:27.524: E/com.imagine.GCMIntentService(2120): "errors" : [ { 
04-01 19:43:27.524: E/com.imagine.GCMIntentService(2120):  "domain" : "global", 
04-01 19:43:27.524: E/com.imagine.GCMIntentService(2120):  "message" : "java.lang.NoClassDefFoundError: Could not initialize class com.imagine.EMF", 
04-01 19:43:27.524: E/com.imagine.GCMIntentService(2120):  "reason" : "backendError" 
04-01 19:43:27.524: E/com.imagine.GCMIntentService(2120): } ], 
04-01 19:43:27.524: E/com.imagine.GCMIntentService(2120): "message" : "java.lang.NoClassDefFoundError: Could not initialize class com.imagine.EMF" 

回答

0

首先,所提供的信息是沒有那麼其難度OT告訴錯誤的實際原因。其次,我認爲你指的是使用Eclispe的舊文檔。我建議使用Android Studio,它現在是Google的官方IDE,並按照tutorial中的說明操作。

這是相對容易的,因爲解決配置和設置的工作量減半。

有關示例代碼,請參閱here

+0

我找到了錯誤原因,我正在使用java SDK 1.8,而Appengine使用1.7。不過,我會檢查你的鏈接,因爲我沒有處理服務器的經驗,寧願處理部署準備好我的項目 – busted13 2015-04-05 22:30:22

+0

我只是有一些空閒時間,並決定檢查你的教程。絕對簡單和節省時間!但是,服務器部署已準備好嗎?我試圖只作爲管理員發佈 – busted13 2015-04-18 03:19:22