IncompatibleClassChangeError Android Studio

时间:2017-01-09 11:06:49

标签: android android-studio android-fragments stripe-payments

更新Build Tools和SDK后,只要我想添加新卡,我的应用程序就会在我的付款片段中崩溃。

我之前使用Stripe遇到过这个问题,因为我使用的是'com.stripe:stripe-android:+' 然后我切换到稳定版1.0.1,工作正常。

一旦我更新到BuildTools 25.0.1和Stripe 2.0.2,它就会因IncompatibleClassChange错误而崩溃,如果它发生切换回buildtools 23和Stripe 1.0.1,我会遇到同样的问题。

请检查LogCat的屏幕截图 enter image description here

CardEditFragment.java

    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'
apply plugin: 'com.google.gms.google-services'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}


android {
    compileSdkVersion 25
    buildToolsVersion "25.0.1"

    sourceSets.main {
        jni.srcDirs = []
        jniLibs.srcDir 'src/main/libs'
    }

    defaultConfig {
        applicationId "com.pushdr.application"
        minSdkVersion 17
        targetSdkVersion 17

        ndk {
            moduleName "ndkVidyoSample"
        }
    }

    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
        mavenCentral()
        maven { url 'https://github.com/FireZenk/maven-repo/raw/master/' }
    }

    allprojects {
        repositories {
            mavenCentral()
        }
    }

    buildTypes {
        release {
            shrinkResources false
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }


    productFlavors {
        armv7a
                {
                    ndk
                            {
                                abiFilter "armeabi-v7a"

                            }
                }
        fat ///This build contain multi architecture binary
    }
}

dependencies {

    //facebook SDK

    //Used for Signal R + Chat
    compile files('libs/signalr-client-sdk-android.jar')
    compile files('libs/signalr-client-sdk.jar')
    compile files('libs/signalr-client-sdk.jar')

    //Used for PIN entry
    compile project(':pinentry')

    //Menu Drawer
    compile project(':materialTabs')

    //Credit Card Payment Libraries
    compile project(':creditcarddesign')

    //Audio waves
    compile project(':audiowaves')


    compile('com.crashlytics.sdk.android:crashlytics:2.6.4@aar') {
        transitive = true;
    }

    compile 'com.facebook.android:facebook-android-sdk:[4,5)'
    compile 'com.google.firebase:firebase-core:9.2.0'
    compile 'com.roger.gifloadinglibrary:gifloadinglibrary:1.0.0'
    compile 'com.wdullaer:materialdatetimepicker:2.5.0'
    compile 'com.synnapps:carouselview:0.0.9'
    compile 'com.ragnarok.rxcamera:lib:0.0.4'
    compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.17'
    compile 'com.stripe:stripe-android:2.0.2'
    compile 'com.android.support:appcompat-v7:25.1.0'
    compile 'com.android.support:design:25.1.0'
    compile 'com.android.support:support-v4:25.1.0'
    compile 'com.squareup.okhttp3:okhttp:3.4.1'
    compile 'com.github.2359media:EasyAndroidAnimations:0.8'
    compile 'com.mikepenz:crossfader:1.3.7@aar'
    compile 'com.mikepenz:crossfadedrawerlayout:0.3.4@aar'
    compile 'com.mikepenz:itemanimators:0.2.4@aar'
    compile 'com.mikepenz:google-material-typeface:2.2.0.1@aar'
    compile 'com.mikepenz:fontawesome-typeface:4.4.0.1@aar'
    compile 'com.mikepenz:octicons-typeface:3.0.0.1@aar'
    compile 'com.github.amlcurran.showcaseview:library:5.4.3'
    compile 'com.jzxiang.pickerview:TimePickerDialog:1.0.1'
    compile 'com.google.code.gson:gson:2.4'
}

我还包括了我的build.gradle(Module:app)

Bundle[{google.sent_time=1233212221545, msg={"message":"You received a chat message","type":"Match Maker","request_id":"501"}, chat={"owner":0,"request_id":"501"}, from=148566781839, google.message_id=0:148354545211779676%c3fc9c6ff9fd7ecd, android.support.content.wakelockid=3, collapse_key=do_not_collapse}]

我还在StackOverflow上检查了几篇关于incompatibleClassChangeErrors的帖子,但没有帮我解决这个问题。

此应用程序的以前版本的APK工作正常,所以我很清楚为什么会造成这种情况!任何帮助将不胜感激。

0 个答案:

没有答案