【问题标题】:Android gradle error version (3.3.1) problemAndroid gradle 报错版本(3.3.1)问题
【发布时间】:2019-02-27 05:29:26
【问题描述】:

我有旧项目,我升级了 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: 出错时 德兴。 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-plugin


【解决方案1】:

按照以下方式做这些事情:-

  • 在 (build.gradle) 项目中将您的类路径更新为 3.3.1 版。
  • 更新你的最低或高于 4.10.1 .in gradle wrapper
  • 还可以根据项目要求添加 maven 和 google

    这会对你有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-15
    • 1970-01-01
    • 2023-02-18
    • 1970-01-01
    • 1970-01-01
    • 2019-07-03
    相关资源
    最近更新 更多