INSTALL_FAILED_DUPLICATE_PERMISSION ... C2D_MESSAGE [英] INSTALL_FAILED_DUPLICATE_PERMISSION... C2D_MESSAGE
问题描述
我使用谷歌通知,在我的应用程序,而到现在为止我已经在清单中过这样的:
<! - GCM - >
<使用-权限的Android:名称=android.permission.GET_ACCOUNTS/> <! - GCM需要一个谷歌帐户。 - >
<使用-权限的Android:名称=android.permission.WAKE_LOCK/> <! - 进入休眠状态保持处理器接收到消息时。 - >
<使用-权限的Android:名称=com.google.android.c2dm.permission.RECEIVE/> < - !此应用程序有权限注册并接收数据信息。 - >
<! - 创建一个自定义权限所以只有这个程序可以接收它的消息。注:APP_PACKAGE.permission.C2D_MESSAGE - >
<允许机器人:名称=com.myapp.permission.C2D_MESSAGE安卓的ProtectionLevel =签名/>
<使用-权限的Android:名称=com.myapp.permission.C2D_MESSAGE/>
<! - END GCM - >
它完美工作,直到我更新了我的Nexus 7至Android 5.0。
现在,当我尝试安装此设备与Eclipse的应用程序,我得到这个错误:
INSTALL_FAILED_DUPLICATE_PERMISSION烫发= com.myapp.permission.C2D_MESSAGE PKG = com.myapp </ P>
我不明白什么是错的......这是工作,直到完美的Android 5.0。
我知道,我在两行用 C2D_MESSAGE
,许可
和使用-许可
,但我复制从原来的谷歌GCM指南,code,所以它一定是好的。
我已经找到了解决方案,为我工作。
在我的设备(的Nexus 7)的Android 5.0。棒棒堂我按照下面的步骤。
卸载应用程序后,你可能会发现应用程序名
在下载的应用程序列表
设置页。
- 进入设置
- 应用
- 在列表中,你会发现底部的
YourApp
与未安装标签 - 开启
- 点击
OptionMenu
并选择卸载所有用户
在这过程中,我成功地安装新的应用程序,它运行良好。
欢迎来ping我,如果有任何疑问白羊座。谢谢你。
I am using Google notifications in my app, and until now I have had this in the manifest:
<!-- GCM -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> <!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.WAKE_LOCK" /> <!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <!-- This app has permission to register and receive data message. -->
<!-- Creates a custom permission so only this app can receive its messages. NOTE: APP_PACKAGE.permission.C2D_MESSAGE -->
<permission android:name="com.myapp.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.myapp.permission.C2D_MESSAGE" />
<!-- END GCM -->
It worked perfectly until I updated my Nexus 7 to Android 5.0.
Now when I try to install the app in this device with Eclipse, I get this error:
INSTALL_FAILED_DUPLICATE_PERMISSION perm=com.myapp.permission.C2D_MESSAGE pkg=com.myapp
I don't understand what is wrong... it was working perfectly until Android 5.0.
I know that I am using C2D_MESSAGE
in two lines, permission
and uses-permission
but I copied that code from the original Google GCM guide, so it must be fine.
I've found a solution that works for me.
In My Device (Nexus 7) Android 5.0. Lollipop I follow the following steps.
After Uninstalling App You may find App Name
under Apps List of the Downloaded
Tab.
- Go to Settings
- Apps
- At bottom of the list you will find
YourApp
with a "NOT INSTALLED" Tag - Open
- Click on
OptionMenu
and Select "Uninstall for all Users"
After that process I successfully install the new app and it's running well.
Feel free to ping me if any doubt aries. Thanks.
这篇关于INSTALL_FAILED_DUPLICATE_PERMISSION ... C2D_MESSAGE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!