SecurityException,无法显式添加以下类型的帐户:myPakcageName [英] SecurityException,cannot explicitly add accounts of type: myPakcageName

查看:183
本文介绍了SecurityException,无法显式添加以下类型的帐户:myPakcageName的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Firebase上报告了在致命异常以下更新现有应用的同时,

While updating existing app below fatal exception is reported on Firebase,

Exception java.lang.SecurityException: uid 10123 cannot explicitly add accounts of type: com.ominfowave.android
android.os.Parcel.readException (Parcel.java:1599)
android.os.Parcel.readException (Parcel.java:1552)
android.accounts.IAccountManager$Stub$Proxy.addAccountExplicitly(IAccountManager.java:890)
android.accounts.AccountManager.addAccountExplicitly(AccountManager.java:712)
com.ominfowave.android.sync.SyncAdapter.createSyncAccountIfNeeded(SyncAdapter.java:86)
com.ominfowave.android.sync.SyncAdapter.triggerRefresh (SyncAdapter.java:110)
com.ominfowave.android.MyApplication.onConfigurationChanged (MyApplication.java:159)
android.app.ActivityThread.performConfigurationChanged (ActivityThread.java:4414)
android.app.ActivityThread.handleConfigurationChanged (ActivityThread.java:4487)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1598)
android.os.Handler.dispatchMessage (Handler.java:111)
android.os.Looper.loop (Looper.java:207)
android.app.ActivityThread.main (ActivityThread.java:5728)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:789)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:679)

Mainfest.xml已经具有以下代码

Mainfest.xml already have below code

<service android:name="your.AuthService">
<intent-filter>
    <action android:name="android.accounts.AccountAuthenticator" />
</intent-filter>
<meta-data android:name="android.accounts.AccountAuthenticator"
     android:resource="@xml/authenticator" />

推荐答案

我遇到了此错误,我认为这是因为我清除了应用程序的缓存和存储,然后卸载了我的应用程序.下次安装并运行该应用程序时,我在这篇文章中看到了相同的例外.电话重启对我来说解决了这个问题.

I ran into this error, and I think it was because I cleared my app's cache and storage, and then uninstalled my app. The next time I installed and ran the app I saw the same exception from this post. A phone restart fixed the problem for me.

这篇关于SecurityException,无法显式添加以下类型的帐户:myPakcageName的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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