android - java.lang.VerifyError when initial LocationServices -
i update google play service sdk (rev 29) in android sdk manager recently. found apk build after sdk updated crash during initial googleapiclient.
here code use.
mgoogleapiclient = new googleapiclient.builder(this) .addconnectioncallbacks(this) .addonconnectionfailedlistener(this) .addapi(locationservices.api) .build();
and here log of call stack
e/androidruntime: fatal exception: main
process: com.xxxxxxx.xxxxx, pid: 3855
java.lang.verifyerror: rejecting class com.google.android.gms.location.internal.zzd because failed compile-time verification (declaration of 'com.google.android.gms.location.internal.zzd' appears in /data/app/com.xxxxxx.xxxx-2/base.apk) @ com.google.android.gms.location.locationservices.(unknown source)
the google play service version use com.google.android.gms:play-services-location:8.3.0
i try update location service 8.4.0.
cause version conflict updating 8.4.0.
follow instruction in above link.
problem solved.
here instruction use.
- change use compile 'com.google.android.gms:play-services-location:8.3.0' in app build.gradle
- move apply plugin: 'com.google.gms.google-services' end of app build.gradle
- use classpath 'com.google.gms:google-services:2.0.0-alpha3' in project build.gradle dependency
- change use gradle-2.8 in gradle/wrapper/gradle-wrapper.properties
Comments
Post a Comment