小编shr*_*esh的帖子

Gradle Xpp3错误

我在为发布版本执行gradle构建时遇到此错误.

错误:xpp3定义了与Android现在提供的类冲突的类.解决方案包括查找没有相同问题的更新版本或替代库(例如,对于httpclient使用HttpUrlConnection或okhttp),或者使用jarjar之类的东西重新打包库.[DuplicatePlatformClasses]

我试图排除,httpclient但没有帮助.
在调试版本中它的工作但在发布版本中它给了我这个错误.

我使用的是Android异步Http客户端,但删除它也无法解决错误.

我的gradle看起来像这样:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.corona.corona"
        minSdkVersion 21
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

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

        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support:support-v4:26.1.0'
    implementation 'com.android.support:recyclerview-v7:26.1.0'
    implementation 'com.android.support:cardview-v7:26.1.0'
    implementation 'com.pkmmte.view:circularimageview:1.1'
    implementation 'com.google.code.gson:gson:2.8.0'
    implementation 'org.igniterealtime.smack:smack-android:4.1.0'
    implementation 'org.igniterealtime.smack:smack-tcp:4.1.0'
    implementation 'org.igniterealtime.smack:smack-android-extensions:4.1.0'
    implementation 'com.mcxiaoke.volley:library:1.0.19'
    implementation …
Run Code Online (Sandbox Code Playgroud)

android gradle android-gradle-plugin

9
推荐指数
1
解决办法
1053
查看次数

标签 统计

android ×1

android-gradle-plugin ×1

gradle ×1