Android Gradle错误版本(3.3.1)问题 [英] Android gradle error version (3.3.1) problem
问题描述
我有旧项目,并且升级了gradle.Gradle最新版本3.3.1.请帮我.如何解决此错误?
I have old project and I upgrade gradle. Gradle latest version 3.3.1. Please help me. How to fix this error?
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: Failed to process /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.builder.dexing.DexArchiveBuilderException: Error while dexing. com.android.tools.r8.CompilationFailedException: Compilation failed to complete
com.android.tools.r8.utils.AbortException:错误:接口 android.support.v4.app.FragmentContainer(classpath class)
用作 android.support.v4.app.Fragment $ 2
的超类.
com.android.tools.r8.utils.AbortException: Error:
Interface android.support.v4.app.FragmentContainer(classpath class)
used as super class of android.support.v4.app.Fragment$2
.
接口 android.support.v4.app.FragmentContainer(classpath class)
用作 android.support.v4.app.Fragment $ 2
的超类.
成绩文件:
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'
}
推荐答案
请按照以下步骤进行操作:-
Do these things as follws:-
- 在(build.gradle)项目中将您的类路径更新为版本3.3.1.
- 在gradle包装器中为您更新至少等于或大于4.10.1的内容
-
还根据您项目中的要求添加maven和google
- Update your Class path to version 3.3.1 in (build.gradle) Project.
- Update you minimum or greater than 4.10.1 .in gradle wrapper
Also add maven and google as per required in your project
这会为您提供帮助.
这篇关于Android Gradle错误版本(3.3.1)问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!