java.lang.SecurityException: caller uid 10039 is different than the authenticator's uid

来源:互联网 发布:字符串转json 编辑:程序博客网 时间:2024/05/16 08:10

目前在做一个项目,就是登录应用后,自动在系统的设置-->账号与同步的列表里增加我们的应用。

昨天 ,报了  java.lang.SecurityException: caller uid 10039 is different than the authenticator's uid。网上有的说是manifest.xml里面没有添加权限。

但是我的权限都加了,后来发现是在xml/authenticatior.xml中,  android:accountType="api.myapplication.cn"与写的Authenticator.java中addAccount()里要添加的账号accountType不一致造成的。

0 0