我試圖實現GCM,但我得到一個錯誤,我試圖找到日誌互聯網,但我不能。 當代碼提供這些行,我在logcat的Android GCM- GCMRegistrar checkManifest(this) - 清單文件錯誤
GCMRegistrar.checkDevice(this);
GCMRegistrar.checkManifest(this);
意味着什麼這個logcat的輸出得到錯誤?
09-11 11:14:25.132: W/dalvikvm(11946): threadid=11: thread exiting with uncaught exception (group=0x40aac210)
09-11 11:14:25.142: E/AndroidRuntime(11946): FATAL EXCEPTION: IntentService[ManagePushCommunicationService]
09-11 11:14:25.142: E/AndroidRuntime(11946): java.lang.IllegalStateException: Application does not define permission com.example.push.permission.C2D_MESSAGE
09-11 11:14:25.142: E/AndroidRuntime(11946): at com.google.android.gcm.GCMRegistrar.checkManifest(GCMRegistrar.java:135)
09-11 11:14:25.142: E/AndroidRuntime(11946): at com.example.push.services.ManagePushCommunicationService.startJob(ManagePushCommunicationService.java:156)
09-11 11:14:25.142: E/AndroidRuntime(11946): at com.example.push.services.ManagePushCommunicationService.onHandleIntent(ManagePushCommunicationService.java:85)
09-11 11:14:25.142: E/AndroidRuntime(11946): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
09-11 11:14:25.142: E/AndroidRuntime(11946): at android.os.Handler.dispatchMessage(Handler.java:99)
09-11 11:14:25.142: E/AndroidRuntime(11946): at android.os.Looper.loop(Looper.java:137)
09-11 11:14:25.142: E/AndroidRuntime(11946): at android.os.HandlerThread.run(HandlerThread.java:60)
09-11 11:19:25.162: I/Process(11946): Sending signal. PID: 11946 SIG: 9
沒有你設法得到它的工作,因爲很多人都在按照Android開發者示例代碼得到這個錯誤它非常令人沮喪? – androidu
您必須在模擬器中檢查它。 –