Android gradle错误版本(3.3.1)问题

问题描述 投票:0回答:1

我有旧项目,我升级gradle。 Gradle最新版本3.3.1。请帮我。如何解决这个错误?

com.android.builder.dexing.DexArchiveBuilderException:无法处理/Users/username/.gradle/caches/transforms-1/files-1.1/support-fragment-28.0.0.aar/68845f02634c30733176d6df0bd9a4c9/jars/classes.jar

com.android.builder.dexing.DexArchiveBuilderException:dexing时出错。 com.android.tools.r8.CompilationFailedException:编译未能完成

com.android.tools.r8.utils.AbortException:错误:接口android.support.v4.app.FragmentContainer(classpath class)用作android.support.v4.app.Fragment$2的超类。

接口android.support.v4.app.FragmentContainer(classpath class)用作android.support.v4.app.Fragment$2的超级类。

Gradle文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "az.test.app”
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildToolsVersion '28.0.3'
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.loopj.android:android-async-http:1.4.9'
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.github.castorflex.smoothprogressbar:library:1.1.0'
    implementation 'com.android.volley:volley:1.1.1'
    implementation project(':librarypull')
    implementation project(':GigglePicker')
    implementation project(':ResideMenu')
    implementation project(':Imageload')
    implementation project(':TouchImageView')
    implementation 'com.android.support:design:28.0.0'
}
java android android-gradle
1个回答
0
投票

做这些事情如下: -

  • 将类路径更新到(build.gradle)Project中的3.3.1版。
  • 在gradle包装器中更新最小或大于4.10.1。
  • 还可以根据项目中的要求添加maven和google 这会对你有所帮助。
© www.soinside.com 2019 - 2024. All rights reserved.