我创建了一个在应用商品中购买的应用。一切都好。但在某些手机上,他们无法打开谷歌播放,每次尝试打开谷歌播放时,谷歌播放的主页只会立即显示并关闭。在我的应用程序中,当我尝试绑定到谷歌播放时,我的应用程序也立即关闭。但我的过程并没有被杀死,只是屏幕回到主屏幕。是否有任何标志或某些东西要设置以避免这种情况?
关于Google Play关闭的日志如下:
java.lang.SecurityException: Permission Denial: reading com.google.android.gsf.gservices.GservicesProvider uri content://com.google.android.gsf.gservices/prefix from pid=12038, uid=10082 requires com.google.android.providers.gsf.permission.READ_GSERVICES, or grantUriPermission()
E/DatabaseUtils( 7206): at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:332)
E/DatabaseUtils( 7206): at android.content.ContentProvider$Transport.query(ContentProvider.java:188)
E/DatabaseUtils( 7206): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:113)
E/DatabaseUtils( 7206): at android.os.Binder.execTransact(Binder.java:367)
E/DatabaseUtils( 7206): at dalvik.system.NativeStart.run(Native Method)
W/dalvikvm(12038): threadid=1: thread exiting with uncaught exception (group=0x41067360)
E/AndroidRuntime(12038): FATAL EXCEPTION: main
E/AndroidRuntime(12038): java.lang.RuntimeException: Unable to create application com.google.android.finsky.FinskyApp: java.lang.SecurityException: Permission Denial: reading com.google.android.gsf.gservices.GservicesProvider uri content://com.google.android.gsf.gservices/prefix from pid=12038, uid=10082 requires com.google.android.providers.gsf.permission.READ_GSERVICES, or grantUriPermission()
E/AndroidRuntime(12038): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4211)
E/AndroidRuntime(12038): at android.app.ActivityThread.access$1300(ActivityThread.java:136)
E/AndroidRuntime(12038): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
E/AndroidRuntime(12038): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(12038): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(12038): at android.app.ActivityThread.main(ActivityThread.java:4803)
E/AndroidRuntime(12038): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(12038): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(12038): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
E/AndroidRuntime(12038): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
E/AndroidRuntime(12038): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(12038): Caused by: java.lang.SecurityException: Permission Denial: reading com.google.android.gsf.gservices.GservicesProvider uri content://com.google.android.gsf.gservices/prefix from pid=12038, uid=10082 requires com.google.android.providers.gsf.permission.READ_GSERVICES, or grantUriPermission()
E/AndroidRuntime(12038): at android.os.Parcel.readException(Parcel.java:1425)
E/AndroidRuntime(12038): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:188)
E/AndroidRuntime(12038): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140)
E/AndroidRuntime(12038): at android.content.ContentProviderProxy.query(ContentProviderNative.java:366)
E/AndroidRuntime(12038): at android.content.ContentResolver.query(ContentResolver.java:411)
E/AndroidRuntime(12038): at android.content.ContentResolver.query(ContentResolver.java:354)
E/AndroidRuntime(12038): at com.google.android.gsf.Gservices.getStringsByPrefix(Gservices.java:203)
E/AndroidRuntime(12038): at com.google.android.gsf.Gservices.bulkCacheByPrefix(Gservices.java:222)
E/AndroidRuntime(12038): at com.google.android.finsky.config.GservicesValue$GservicesReaderImpl.<init>(GservicesValue.java:137)
E/AndroidRuntime(12038): at com.google.android.finsky.config.GservicesValue.init(GservicesValue.java:22)
E/AndroidRuntime(12038): at com.google.android.finsky.FinskyApp.onCreate(FinskyApp.java:278)
E/AndroidRuntime(12038): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:999)
E/AndroidRuntime(12038): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4208)
E/AndroidRuntime(12038): ... 10 more
答案 0 :(得分:0)
您的堆栈跟踪提供了答案:您需要添加
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
到您的AndroidManifest.xml
答案 1 :(得分:0)
这是Google引入的错误。不确定是否有一个好的解决方法。 请参阅此处的主题:https://groups.google.com/forum/#!topic/google-admob-ads-sdk/sePctoDJbRg%5B101-125-false%5D