Dopo l'implementazione di Google Analytics, la mia app si interrompe istantaneamente su dispositivi precedenti a Lollipop.Implementazione di Google Analytics 7.5.0 (Servizi di riproduzione) su Android 4.4 e versioni precedenti arresti anomali allo
07-22 15:42:43.831: W/dalvikvm(1815): VFY: unable to resolve virtual method 16407: Lcom/google/android/gms/analytics/internal/zzg;.getApplicationContext ()Landroid/content/Context;
07-22 15:42:43.831: D/dalvikvm(1815): VFY: replacing opcode 0x6e at 0x0003
07-22 15:42:43.831: I/dalvikvm(1815): Could not find method com.google.android.gms.internal.zzld.zzoQ, referenced from method com.google.android.gms.analytics.internal.zzf.zzV
07-22 15:42:43.831: W/dalvikvm(1815): VFY: unable to resolve static method 27402: Lcom/google/android/gms/internal/zzld;.zzoQ()Lcom/google/android/gms/internal/zzlb;
07-22 15:42:43.831: D/dalvikvm(1815): VFY: replacing opcode 0x71 at 0x000e
07-22 15:42:43.831: W/dalvikvm(1815): VFY: unable to find class referenced in signature (Lcom/google/android/gms/internal/zzlb;)
07-22 15:42:43.831: W/dalvikvm(1815): VFY: Ljava/lang/Object; is not instance of Lcom/google/android/gms/analytics/internal/zzd;
07-22 15:42:43.831: W/dalvikvm(1815): VFY: bad arg 1 (into Lcom/google/android/gms/analytics/internal/zzd;)
07-22 15:42:43.831: W/dalvikvm(1815): VFY: rejecting call to Lcom/google/android/gms/analytics/internal/zzf;.zza (Lcom/google/android/gms/analytics/internal/zzd;)V
07-22 15:42:43.831: W/dalvikvm(1815): VFY: rejecting opcode 0x70 at 0x0002
07-22 15:42:43.831: W/dalvikvm(1815): VFY: rejected Lcom/google/android/gms/analytics/internal/zzf;.zzhT()Lcom/google/android/gms/analytics/internal/zzv;
07-22 15:42:43.831: W/dalvikvm(1815): Verifier rejected class Lcom/google/android/gms/analytics/internal/zzf;
07-22 15:42:43.831: D/AndroidRuntime(1815): Shutting down VM
07-22 15:42:43.831: W/dalvikvm(1815): threadid=1: thread exiting with uncaught exception (group=0xb0ce1b20)
07-22 15:42:43.831: E/AndroidRuntime(1815): FATAL EXCEPTION: main
07-22 15:42:43.831: E/AndroidRuntime(1815): Process: ---, PID: 1815
07-22 15:42:43.831: E/AndroidRuntime(1815): java.lang.VerifyError: com/google/android/gms/analytics/internal/zzf
07-22 15:42:43.831: E/AndroidRuntime(1815): at com.google.android.gms.analytics.GoogleAnalytics.getInstance(Unknown Source)
07-22 15:42:43.831: E/AndroidRuntime(1815): at com.x.x.x.onCreate(x.java:22)
07-22 15:42:43.831: E/AndroidRuntime(1815): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
07-22 15:42:43.831: E/AndroidRuntime(1815): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4328)
07-22 15:42:43.831: E/AndroidRuntime(1815): at android.app.ActivityThread.access$1500(ActivityThread.java:135)
07-22 15:42:43.831: E/AndroidRuntime(1815): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
07-22 15:42:43.831: E/AndroidRuntime(1815): at android.os.Handler.dispatchMessage(Handler.java:102)
07-22 15:42:43.831: E/AndroidRuntime(1815): at android.os.Looper.loop(Looper.java:136)
07-22 15:42:43.831: E/AndroidRuntime(1815): at android.app.ActivityThread.main(ActivityThread.java:5001)
07-22 15:42:43.831: E/AndroidRuntime(1815): at java.lang.reflect.Method.invokeNative(Native Method)
07-22 15:42:43.831: E/AndroidRuntime(1815): at java.lang.reflect.Method.invoke(Method.java:515)
07-22 15:42:43.831: E/AndroidRuntime(1815): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
07-22 15:42:43.831: E/AndroidRuntime(1815): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
07-22 15:42:43.831: E/AndroidRuntime(1815): at dalvik.system.NativeStart.main(Native Method)
Il mio file Gradle (all'interno del blocco Android):
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "x.x.x"
minSdkVersion 14
targetSdkVersion 22
versionCode 6
versionName "0.5"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Io uso questa versione di Google Play Services:
compile 'com.google.android.gms:play-services-analytics:7.5.0'
ho cercato un sacco sul web già on questo argomento, ma non è riuscito a trovare nulla che risolvesse il problema. La più vicina era questa risposta su SO, purtroppo non ha funzionato per me: https://stackoverflow.com/a/31432568
Hai servizi di google dichiarati altrove? Cosa succede quando compili l'intera libreria anziché solo analytics 'com.google.android.gms: play-services: 7.5.0'? – Andy
@Leander hai trovato qualche soluzione? – thekosmix
@Andy No, non ho dichiarato il servizio di riproduzione da nessun'altra parte. La mia app è stata compilata correttamente e ricevendo un'eccezione di runtime sui dispositivi pre-lollipop – thekosmix