0

我正在使用 google services 1.5.0-beta2,使用 Android Studio 构建。

我刚刚在我的项目中实现了 OneSignal,对于某些设备,它会导致此异常并在启动时崩溃:

java.lang.RuntimeException: Unable to get provider com.google.android.gms.measurement.AppMeasurementContentProvider: android.content.res.Resources$NotFoundException: String resource ID #0x7f060042
    at android.app.ActivityThread.installProvider(ActivityThread.java:5177)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:4769)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4709)
    at android.app.ActivityThread.-wrap1(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1415)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5443)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)   
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x7f060042
    at android.content.res.Resources.getText(Resources.java:312)
    at android.content.res.Resources.getString(Resources.java:400)
    at com.google.android.gms.measurement.zza.<init>(Unknown Source)
    at com.google.android.gms.measurement.zza.zzaR(Unknown Source)
    at com.google.android.gms.measurement.internal.zzn.zziJ(Unknown Source)
    at com.google.android.gms.measurement.internal.zzz.zza(Unknown Source)
    at com.google.android.gms.measurement.internal.zzw.<init>(Unknown Source)
    at com.google.android.gms.measurement.internal.zzaa.zzDj(Unknown Source)
    at com.google.android.gms.measurement.internal.zzw.zzaT(Unknown Source)
    at com.google.android.gms.measurement.AppMeasurementContentProvider.onCreate(Unknown Source)
    at android.content.ContentProvider.attachInfo(ContentProvider.java:1748)
    at android.content.ContentProvider.attachInfo(ContentProvider.java:1723)
    at android.app.ActivityThread.installProvider(ActivityThread.java:5174)
    ... 10 more

依赖列表:

dependencies {
    //compile 'com.google.android.gms:play-services:+'
    compile('com.afollestad.material-dialogs:core:0.8.5.9') {
        transitive = true
    }
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.google.android.gms:play-services-analytics:8.4.0'
    compile 'com.google.android.gms:play-services-gcm:8.4.0'
    compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
    compile 'io.nlopez.smartadapters:library:1.3.0'
    compile 'com.jakewharton:butterknife:7.0.1'
    compile 'com.koushikdutta.ion:ion:2.+'
    compile 'com.jakewharton:process-phoenix:1.0.2'
    compile 'com.karumi:dexter:2.2.2'
    compile 'com.android.support:design:23.4.0'
    compile 'com.onesignal:OneSignal:2.+@aar'
    compile 'com.google.android.gms:play-services-gcm:8.4.0'
    compile 'com.google.android.gms:play-services-analytics:8.4.0'
    compile "com.google.android.gms:play-services-location:8.4.0"
    //compile 'com.github.hotchemi.PermissionsDispatcher:permissionsdispatcher:2.1.1'
}
4

0 回答 0