Can not run application below lollipop

本秂侑毒 提交于 2019-12-29 07:43:20

问题


I am working with android studio .My application working fine in lollipop devices but when i run application in below lollipop devices it gives me given below error message. I have also tried with this answer

In case of problem, please repackage it with jarjar to change the class packages Warning:Dependency xpp3:xpp3:1.1.4c is ignored for release as it may be conflicting with the internal version provided by Android. In case of problem, please repackage it with jarjar to change the class packages Warning:Dependency xpp3:xpp3:1.1.4c is ignored for debug as it may be conflicting with the internal version provided by Android.

My build.gradle is:

    apply plugin: 'com.android.application'

    android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.mypackagename"
        minSdkVersion 14
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'),   'proguard-rules.pro'
        }
    }
    }

    dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.0.0'
    compile 'com.android.support:recyclerview-v7:21.0.+'
    compile project(':library')

    compile 'com.loopj.android:android-async-http:1.4.7'
    compile 'com.googlecode.libphonenumber:libphonenumber:7.0.5'
    compile 'com.afollestad:material-dialogs:0.7.4.2'

    //For XMPP
    compile 'org.igniterealtime.smack:smack-android:4.1.0'
    // Optional for XMPPTCPConnection
    compile 'org.igniterealtime.smack:smack-tcp:4.1.0'
    // Optional for XMPP-IM (RFC 6121) support (Roster, Threaded Chats, …)
    compile 'org.igniterealtime.smack:smack-im:4.1.0'
    // Optional for XMPP extensions support
    compile 'org.igniterealtime.smack:smack-extensions:4.1.0'

    compile 'com.android.support:multidex:1.0.1'

    /*  compile "org.igniterealtime.smack:smack-android:4.1.0-rc1"
            // Optional for XMPPTCPConnection
            compile "org.igniterealtime.smack:smack-tcp:4.1.0-rc1"
            // Optional for XMPP-IM (RFC 6121) support (Roster, Threaded Chats, …)
            compile "org.igniterealtime.smack:smack-im:4.1.0-rc1"
            // Optional for XMPP extensions support
            compile "org.igniterealtime.smack:smack-extensions:4.1.0-rc1"
            compile "org.igniterealtime.smack:smack-tcp:4.1.0-alpha6"*/

}

回答1:


you can add the code below in your build.gradle file. It work for me:

configurations {
    all*.exclude group: 'xpp3', module: 'xpp3'
}


来源:https://stackoverflow.com/questions/31049735/can-not-run-application-below-lollipop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!