java.lang.SecurityException:试图未经许可读取 gservices

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22672846/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 17:13:37  来源:igfitidea点击:

java.lang.SecurityException: attempting to read gservices without permission

javaandroidgoogle-play-services

提问by Werner

I have recently changed from adMob 6.4.1to Google Play Services rev 15and have just received notice of a new crash report that I do not understand:

我最近已从adMob 6.4.1Google Play 服务更改为 Google Play 服务rev 15,并且刚刚收到一个我不明白的新崩溃报告的通知:

java.lang.SecurityException: attempting to read gservices without permission: Neither user 10158 nor current process has com.google.android.providers.gsf.permission.READ_GSERVICES.
at android.os.Parcel.readException(Parcel.java:1425)
at android.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)

I did some research, and all the results are either outdated, or are related to Google+ / Google Maps, neither of which I use in the app.

我做了一些研究,所有的结果要么已经过时,要么与 Google+ / Google 地图相关,我在应用程序中都没有使用这两个。

I've never read anywhere in the GPS Developer guide for adMob that I needed to add the READ GSERVICESpermission...

我从未在 adMob 的 GPS 开发人员指南中阅读过任何需要添加 READ GSERVICES权限的地方...

Anyone know what this is about?

有谁知道这是关于什么的?

采纳答案by user1026605

This issue was introduced with the latest release of the Google Play Services (v4.3) on the android devices. Google is aware about it and it will be fixed in a future version (not the next one...)

此问题是在 Android 设备上最新版本的 Google Play 服务 (v4.3) 中引入的。谷歌知道它,它将在未来的版本中修复(不是下一个......)

https://groups.google.com/forum/#!topic/google-admob-ads-sdk/sePctoDJbRg%5B101-125-false%5D

https://groups.google.com/forum/#!topic/google-admob-ads-sdk/sePctoDJbRg%5B101-125-false%5D

回答by Epsilon3

I'm not going to claim this is the answer, because I also stopped (completely) and re-started Android Studio after I installed it, and THAT might be the real solution, but Ads were running fine on the emulator and a USB-attached 7" tablet, then I started getting this error. Checking my SDK packages, I noted the Google Web Driver was not installed (this had not been an issue previously) - all other components were (except the USB driver, which is not needed on a Mac). I installed this component, stopped (completely) and re-started Android Studio and the ads started running without error again. It's something to try, anyway.

我不会声称这是答案,因为我在安装 Android Studio 后也停止了(完全)并重新启动了它,这可能是真正的解决方案,但广告在模拟器和 USB 上运行良好-连接 7" 平板电脑,然后我开始收到此错误。检查我的 SDK 包,我注意到未安装 Google Web 驱动程序(以前这不是问题)-所有其他组件都已安装(USB 驱动程序除外,不需要它)在 Mac 上。我安装了这个组件,停止(完全)并重新启动 Android Studio,广告再次开始运行,没有错误。无论如何,这是值得尝试的。