【发布时间】:2015-08-02 08:07:15
【问题描述】:
我最近在使用 Android Studio 模拟器时遇到了这个问题,我不明白它是如何出现的以及为什么会出现,因为直到现在我的模拟器和应用程序都运行良好。
现在,当我尝试运行我的应用(使用 Google 地图和 Google Places Autocompletion)时,一条消息显示未安装 Google Play 服务。我设法将它安装在我的模拟器上,但该应用程序仍然无法正常工作。出现 Google 地图,但 Google 地方信息自动完成功能不再起作用。
我注意到这是 Android 开发人员中的一个常见问题,经过一些研究,我一直在尝试调整一些解决方案,但问题仍然存在。
谁能帮我解决这个问题并向我解释为什么会这样?是因为一些 Android Studio 更新了吗?
(错误消息)
05-20 21:56:52.528: A/GmsApplication(2108): Unable to install secure provider, due to exception:
05-20 21:56:52.528: A/GmsApplication(2108): java.lang.SecurityException: attempting to read gservices without permission: Neither user 10053 nor current process has com.google.android.providers.gsf.permission.READ_GSERVICES.
05-20 21:56:52.528: A/GmsApplication(2108): at android.app.ContextImpl.enforce(ContextImpl.java:1914)
05-20 21:56:52.528: A/GmsApplication(2108): at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1943)
05-20 21:56:52.528: A/GmsApplication(2108): at android.content.ContextWrapper.enforceCallingOrSelfPermission(ContextWrapper.java:600)
05-20 21:56:52.528: A/GmsApplication(2108): at com.google.android.gsf.f.c(SourceFile:107)
05-20 21:56:52.528: A/GmsApplication(2108): at com.google.android.gsf.f.a(SourceFile:121)
05-20 21:56:52.528: A/GmsApplication(2108): at com.google.android.gsf.f.a(SourceFile:227)
05-20 21:56:52.528: A/GmsApplication(2108): at com.google.android.gms.common.a.l.a(SourceFile:301)
05-20 21:56:52.528: A/GmsApplication(2108): at com.google.android.gms.common.a.e.a(SourceFile:219)
05-20 21:56:52.528: A/GmsApplication(2108): at com.google.android.gms.common.a.d.c(SourceFile:197)
05-20 21:56:52.528: A/GmsApplication(2108): at com.google.android.gms.common.a.d.d(SourceFile:208)
05-20 21:56:52.528: A/GmsApplication(2108): at com.google.android.gms.common.security.ProviderInstallerImpl.insertProviderGated(SourceFile:90)
05-20 21:56:52.528: A/GmsApplication(2108): at com.google.android.gms.common.app.GmsApplication.onCreate(SourceFile:84)
05-20 21:56:52.528: A/GmsApplication(2108): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
05-20 21:56:52.528: A/GmsApplication(2108): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4556)
05-20 21:56:52.528: A/GmsApplication(2108): at android.app.ActivityThread.access$1500(ActivityThread.java:151)
05-20 21:56:52.528: A/GmsApplication(2108): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
05-20 21:56:52.528: A/GmsApplication(2108): at android.os.Handler.dispatchMessage(Handler.java:102)
05-20 21:56:52.528: A/GmsApplication(2108): at android.os.Looper.loop(Looper.java:135)
05-20 21:56:52.528: A/GmsApplication(2108): at android.app.ActivityThread.main(ActivityThread.java:5257)
05-20 21:56:52.528: A/GmsApplication(2108): at java.lang.reflect.Method.invoke(Native Method)
05-20 21:56:52.528: A/GmsApplication(2108): at java.lang.reflect.Method.invoke(Method.java:372)
05-20 21:56:52.528: A/GmsApplication(2108): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
05-20 21:56:52.528: A/GmsApplication(2108): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
05-20 21:56:52.552: D/AndroidRuntime(2108): Shutting down VM
05-20 21:56:52.560: E/AndroidRuntime(2108): FATAL EXCEPTION: main
05-20 21:56:52.560: E/AndroidRuntime(2108): Process: com.google.android.gms, PID: 2108
05-20 21:56:52.560: E/AndroidRuntime(2108): java.lang.RuntimeException: Unable to start receiver com.google.android.gms.subscribedfeeds.ConfigurationReceiver: java.lang.SecurityException: attempting to read gservices without permission: Neither user 10053 nor current process has com.google.android.providers.gsf.permission.READ_GSERVICES.
05-20 21:56:52.560: E/AndroidRuntime(2108): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2619)
05-20 21:56:52.560: E/AndroidRuntime(2108): at android.app.ActivityThread.access$1700(ActivityThread.java:151)
05-20 21:56:52.560: E/AndroidRuntime(2108): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380)
05-20 21:56:52.560: E/AndroidRuntime(2108): at android.os.Handler.dispatchMessage(Handler.java:102)
05-20 21:56:52.560: E/AndroidRuntime(2108): at android.os.Looper.loop(Looper.java:135)
05-20 21:56:52.560: E/AndroidRuntime(2108): at android.app.ActivityThread.main(ActivityThread.java:5257)
05-20 21:56:52.560: E/AndroidRuntime(2108): at java.lang.reflect.Method.invoke(Native Method)
05-20 21:56:52.560: E/AndroidRuntime(2108): at java.lang.reflect.Method.invoke(Method.java:372)
05-20 21:56:52.560: E/AndroidRuntime(2108): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
05-20 21:56:52.560: E/AndroidRuntime(2108): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
05-20 21:56:52.560: E/AndroidRuntime(2108): Caused by: java.lang.SecurityException: attempting to read gservices without permission: Neither user 10053 nor current process has com.google.android.providers.gsf.permission.READ_GSERVICES.
05-20 21:56:52.560: E/AndroidRuntime(2108): at android.app.ContextImpl.enforce(ContextImpl.java:1914)
05-20 21:56:52.560: E/AndroidRuntime(2108): at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1943)
05-20 21:56:52.560: E/AndroidRuntime(2108): at android.content.ContextWrapper.enforceCallingOrSelfPermission(ContextWrapper.java:600)
05-20 21:56:52.560: E/AndroidRuntime(2108): at com.google.android.gsf.f.c(SourceFile:107)
05-20 21:56:52.560: E/AndroidRuntime(2108): at com.google.android.gsf.f.a(SourceFile:121)
05-20 21:56:52.560: E/AndroidRuntime(2108): at com.google.android.gsf.f.a(SourceFile:182)
05-20 21:56:52.560: E/AndroidRuntime(2108): at com.google.android.gms.subscribedfeeds.ConfigurationReceiver.onReceive(SourceFile:31)
05-20 21:56:52.560: E/AndroidRuntime(2108): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2612)
05-20 21:56:52.560: E/AndroidRuntime(2108): ... 9 more
【问题讨论】:
标签: android google-maps autocomplete google-play-services