android - UncaughtException: java.lang.IncompatibleClassChangeError -
my app working fine, when updated compile 'com.google.android.gms:play-services
version 8.0 9.0
gives following exception.
e/uncaughtexception: java.lang.incompatibleclasschangeerror: method 'java.io.file android.support.v4.content.contextcompat.getnobackupfilesdir(android.content.context)' expected of type virtual instead found of type direct (declaration of 'com.google.android.gms.iid.zzd' appears in /data/data/com.dp.needdepartmentalstore/files/instant-run/dex/slice-com.google.android.gms-play-services-iid-9.0.0_e1052c945fd50ca8f379bb7d2402b9b1cd0dcbb4-classes.dex) @ com.google.android.gms.iid.zzd.zzec(unknown source) @ com.google.android.gms.iid.zzd.<init>(unknown source) @ com.google.android.gms.iid.zzd.<init>(unknown source) @ com.google.android.gms.iid.instanceid.zza(unknown source) @ com.google.android.gms.iid.instanceid.getinstance(unknown source) @ com.google.android.gms.iid.instanceidlistenerservice.zzn(unknown source) @ com.google.android.gms.iid.instanceidlistenerservice.onstartcommand(unknown source) @ android.app.activitythread.handleserviceargs(activitythread.java:3010) @ android.app.activitythread.-wrap17(activitythread.java) @ android.app.activitythread$h.handlemessage(activitythread.java:1442) @ android.os.handler.dispatchmessage(handler.java:102) @ android.os.looper.loop(looper.java:148) @ android.app.activitythread.main(activitythread.java:5417) @ java.lang.reflect.method.invoke(native method) @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:726) @ com.android.internal.os.zygoteinit.main(zygoteinit.java:616)
below app.gradle file
buildscript { repositories { maven { url 'https://maven.fabric.io/public' } } dependencies { classpath 'io.fabric.tools:gradle:1.+' } } apply plugin: 'com.android.application' apply plugin: 'io.fabric' repositories { maven { url 'https://maven.fabric.io/public' } } apply plugin: 'com.google.gms.google-services' android { compilesdkversion 23 buildtoolsversion '23.0.3' defaultconfig { applicationid "com.dp.needdepartmentalstore" minsdkversion 14 targetsdkversion 23 versioncode 26 versionname "5.13" multidexenabled true manifestplaceholders = [manifestapplicationid : "${applicationid}", onesignal_app_id : "16c778cf-8ebc-47a8-9ba8-6815f0223a0e", onesignal_google_project_number: "253919422974"] } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) testcompile 'junit:junit:4.12' compile('com.mikepenz:actionitembadge:3.1.8@aar') { transitive = true } compile('com.weiwangcn.betterspinner:library-material:1.1.0') { exclude group: 'com.android.support', module: 'appcompat-v7' } compile project(':nicespinner') compile files('libs/pgsdk_v1.0.jar') compile files('libs/app42_android_sdk_3.8.jar') compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') { transitive = true; } compile('com.instabug.library:instabugsupport:1+') { exclude group: 'com.mcxiaoke.volley', module: 'library' } compile 'com.android.support:support-v4:23.4.0' compile 'com.android.support:design:23.4.0' compile 'com.daimajia.slider:library:1.1.5@aar' compile 'com.squareup.picasso:picasso:2.5.2' compile 'com.mcxiaoke.volley:library:1.0.19' compile 'com.nineoldandroids:library:2.4.0' compile 'com.makeramen:roundedimageview:2.2.1' compile 'com.android.support:cardview-v7:23.2.1' compile 'com.facebook.android:facebook-android-sdk:4.5.0' compile 'com.bignerdranch.android:expandablerecyclerview:2.0.3' compile 'com.marshalchen.ultimaterecyclerview:library:0.3.18' compile 'com.miguelcatalan:materialsearchview:1.3.0' compile 'com.wdullaer:materialdatetimepicker:2.0.2' compile 'com.google.android.gms:play-services:9.0.0' compile 'de.greenrobot:eventbus:2.4.0' compile 'com.github.shell-software:fab:1.1.2' compile 'com.google.android.gms:play-services-analytics:9.0.0' compile 'com.onesignal:onesignal:2.+@aar' compile 'com.daimajia.swipelayout:library:1.2.0@aar' compile 'com.intuit.sdp:sdp-android:1.0.2' } apply plugin: 'com.google.gms.google-services'
below high level gradle file
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.1.0' classpath 'com.google.gms:google-services:3.0.0' // note: not place application dependencies here; belong // in individual module build.gradle files } } allprojects { repositories { jcenter() } } task clean(type: delete) { delete rootproject.builddir }
how can resolve type of issue
in dependencies add line hope work.
compile 'com.google.android.gms:play-services-maps:8.3.0'
remove line
classpath 'com.google.gms:google-services:3.0.0'
Comments
Post a Comment