使用C2DM开发时的未知权限

时间:2012-01-13 16:40:09

标签: android android-c2dm

我正在开发一款Android应用,它将使用C2DM来处理推送通知。

现在我开始测试它,只是在C2DM上注册设备并将注册ID发送回我的服务器的简单步骤,但我看到很多关于某些权限的警告:

W/PackageManager(59): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH.mail in package com.android.contacts
W/PackageManager(59): Unknown permission android.permission.ADD_SYSTEM_SERVICE in package com.android.phone
W/PackageManager(59): Not granting permission android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS to package com.android.browser (protectionLevel=2 flags=0x1be45)
W/PackageManager(59): Unknown permission com.google.android.gm.permission.WRITE_GMAIL in package com.android.settings
W/PackageManager(59): Unknown permission com.google.android.gm.permission.READ_GMAIL in package com.android.settings
W/PackageManager(59): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH in package com.android.settings
W/PackageManager(59): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH in package com.android.providers.contacts
W/PackageManager(59): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH.cp in package com.android.providers.contacts
W/PackageManager(59): Unknown permission com.google.android.googleapps.permission.ACCESS_GOOGLE_PASSWORD in package com.android.development
W/PackageManager(59): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH in package com.android.development
W/PackageManager(59): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH.ALL_SERVICES in package com.android.development
W/PackageManager(59): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH.YouTubeUser in package com.android.development
W/PackageManager(59): Unknown permission com.google.android.c2dm.permission.RECEIVE in package <my_app_package>
W/ActivityManager(59): Unable to start service Intent { act=com.google.android.c2dm.intent.REGISTER (has extras) }: not found
I/ActivityManager(59): Displayed activity <my_app_package>/.activities.TabsScreen: 2426 ms (total 2426 ms)

我正在使用AVD并且尚未配置任何Google帐户,但仍然很难找到有关无法找到C2DM权限等的消息。

有关正在发生的事情或我忘记添加到项目中的任何提示?

2 个答案:

答案 0 :(得分:0)

您需要使用此处所述的相应权限设置您的清单:http://code.google.com/android/c2dm/#manifest

答案 1 :(得分:0)

我最初将项目中使用的SDK配置为Google API等级8,某些方式将其重新配置为仅使用Android 2.2 SDK API等级8,因此它缺少Google的原生应用。