安卓 java。lang.SecurityException:未经许可尝试读取gservices
我最近从adMob 6.4.1
改为Google Play Services rev 15
,刚刚收到一份新的崩溃报告通知,我不明白:
java.lang.SecurityException: attempting to read gservices without permission: Neither user 10158 nor current process has com.google.安卓.providers.gsf.permission.READ_GSERVICES.
at 安卓.os.Parcel.readException(Parcel.java:1425)
at 安卓.os.Parcel.readException(Parcel.java:1379)
at xs.a(SourceFile:133)
at xo.a(SourceFile:133)
at xo.a(SourceFile:118)
at ud.d(SourceFile:88)
at ud.b(SourceFile:129)
at ua.a(SourceFile:239)
at ua.a(SourceFile:176)
at aas.a(SourceFile:118)
at abz.run(SourceFile:14)
at acb.run(SourceFile:30)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:856)
我做了一些研究,所有的结果要么已经过时,要么与Google+/Google地图有关,我在应用程序中都没有使用这两个
我从未阅读过adMob的GPS开发者指南中需要添加
READ GSERVICES
权限
有人知道这是怎么回事吗
# 1 楼答案
我不会说这就是答案,因为我也在安装Android Studio后停止(完全)重新启动了它,这可能是真正的解决方案,但是,在模拟器和USB连接的7英寸平板电脑上,Ads运行正常,然后我开始出现这个错误。检查我的SDK包,我注意到没有安装Google Web驱动程序(这以前不是问题)-所有其他组件都安装了(除了Mac上不需要的USB驱动程序)。我安装了这个组件,然后停止(完全)并重新启动了Android Studio,广告再次无误运行。无论如何,这是值得尝试的
# 2 楼答案
这个问题是在android设备上最新发布的Google Play服务(v4.3)中引入的。谷歌已经意识到了这一点,它将在未来的版本中得到修复(而不是下一个版本…)
https://groups.google.com/forum/#!topic/google-admob-ads-sdk/sePctoDJbRg%5B101-125-false%5D