SecurityException异常中的AccountManager的机器人getPassword来 [英] SecurityException in getPassword of accountManager in android

查看:278
本文介绍了SecurityException异常中的AccountManager的机器人getPassword来的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找回谷歌帐户的密码,但得到 安全性异常的字符串PWD = AccountManager.get(mContext).getPassword(帐户)。 另外我给的权限在AndroidManifest.xml中到 account_manager,aunthenticator,get_account,管理账户。

I'm trying to retrieve the password of google account, but getting security exception at String pwd = AccountManager.get(mContext).getPassword(account). Also i have given permissions in androidManifest.xml to account_manager, aunthenticator, get_account, manage account.

android.accounts.Account[] gaccounts = AccountManager.get(mContext).getAccounts();
Log.i("parul", "2222()len :"+ gaccounts.length);
for (android.accounts.Account account: gaccounts) {
   String pwd = AccountManager.get(mContext).getPassword(account);
   Log.i("parul", "google pwd: " + pwd);
   AccountManager.get(mContext).setPassword(account, null);
   String pwdcleared = AccountManager.get(mContext).getPassword(account);
   Log.i("parul", "google pwdcleared: " + pwdcleared);
}

=============================================== ==============================

=============================================================================

6月8日至四日:38:30.821:WARN / AccountManagerService(2248):来电UID 1000 比认证的uid

08-04 06:38:30.821: WARN/AccountManagerService(2248): caller uid 1000 is different than the authenticator's uid

6月8日至四日:38:30.821:信息/ parul(2804):抛出的异常的帐户 经理try块

08-04 06:38:30.821: INFO/parul(2804): exception thrown for account manager try block

6月8日至四日:38:30.821:WARN / System.err的(2804):java.lang.SecurityException异常:来电UID 1000比不同 身份验证器的UID

08-04 06:38:30.821: WARN/System.err(2804): java.lang.SecurityException: caller uid 1000 is different than the authenticator's uid

6月8日至四日:38:30.821:WARN / System.err的(2804):在 android.os.Parcel.readException(Parcel.java:1218)

08-04 06:38:30.821: WARN/System.err(2804): at android.os.Parcel.readException(Parcel.java:1218)

6月8日至四日:38:30.821:WARN / System.err的(2804):在 android.os.Parcel.readException(Parcel.java:1206)

08-04 06:38:30.821: WARN/System.err(2804): at android.os.Parcel.readException(Parcel.java:1206)

6月8日至四日:38:30.821:WARN / System.err的(2804):在 android.accounts.IAccountManager $存根 $ Proxy.getPassword(IAccountManager.java:397)

08-04 06:38:30.821: WARN/System.err(2804): at android.accounts.IAccountManager$Stub $Proxy.getPassword(IAccountManager.java:397)

6月8日至四日:38:30.821:WARN / System.err的(2804):在 android.accounts.AccountManager.getPassword(AccountManager.java:157)

08-04 06:38:30.821: WARN/System.err(2804): at android.accounts.AccountManager.getPassword(AccountManager.java:157)

=============================================== ==============================

=============================================================================

如果有人知道为什么我得到这个问题,plz帮助。 谢谢

If anybody is aware why i'm getting this problem plz help. Thanks

推荐答案

据我的 阅读这篇文章 ,这个错误是因为不匹配的配置。你需要在细节dedug

As far as I read this post, the error is because of mismatch configuration. You need to dedug in details

这篇关于SecurityException异常中的AccountManager的机器人getPassword来的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆