当我从Gradle and Migration升级到AndroidX时,看到此错误,我不知道如何解决
更新gradle后出现问题
apply plugin: 'com.android.application'
apply plugin: 'com.jakewharton.butterknife'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "com.centrocomercialonline"
minSdkVersion 17
targetSdkVersion 28
versionCode 11
versionName "11"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// Enabling multidex support.
multiDexEnabled true
// useLibrary 'org.apache.http.legacy'
// this library is needed for asynktast http client working in android 6.0
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
/*this is needed for after adding 3 library in lib folder for multipart (Start)*/
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/ECLIPSE_.SF'
exclude 'META-INF/ECLIPSE_.RSA'
}
/*this is needed for after adding 3 library in lib folder for multipart (End)*/
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.google.firebase:firebase-messaging:11.8.0'
//implementation fileTree(include: ['*.jar'], dir: 'libs')
/* androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})*/
/*this is needed for using multipart option for sending image to server so we add 3 jar files in lib folder and add dependency from project structure (Start)*/
implementation project(':CircularProgress-google')
implementation files('libs/httpclient-4.3.6.jar')
implementation files('libs/httpcore-4.3.3.jar')
implementation files('libs/httpmime-4.3.6.jar')
implementation 'com.android.support:multidex:1.0.3'
implementation 'cn.pedant.sweetalert:library:1.3'
implementation files('libs/PGSDK_V2.1.jar') //implementation files('libs/PGSDK_V2.0.jar')
implementation 'cn.pedant.sweetalert:library:1.3'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.github.anshulagarwal06:PasswordEditText:v1.0'
implementation 'com.jaredrummler:material-spinner:1.3.1'
implementation 'com.github.rey5137:material:1.2.5'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.daimajia.easing:library:2.1@aar'
implementation 'com.daimajia.androidanimations:library:2.3@aar'
implementation 'com.sdsmdg.tastytoast:tastytoast:0.0.4'
implementation 'com.github.traex.rippleeffect:library:1.3'
implementation 'com.nispok:snackbar:2.11.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.facebook.android:facebook-android-sdk:5.0.0'
implementation 'com.taishi-y:flipprogressdialog:0.1.0'
implementation 'me.relex:circleindicator:1.2.2@aar'
implementation 'com.romandanylyk:pageindicatorview:0.1.1'
implementation 'com.shawnlin:number-picker:2.4.2'
implementation 'com.android.support:percent:28.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.yalantis:ucrop:2.2.0'
implementation 'com.github.jksiezni.permissive:permissive:0.2'
implementation 'com.paypal.sdk:paypal-android-sdk:2.16.0'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.10.12'
implementation 'com.github.bhargavms:DotLoader:1.0.3'
implementation 'com.github.minube:Text-Length-Bar:beta-1.0'
implementation 'com.haozhang.libary:android-slanted-textview:1.2'
implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta1'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
testImplementation 'junit:junit:4.13-beta-3'
implementation 'com.jakewharton:butterknife-gradle-plugin:10.1.0'
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
implementation 'com.google.code.gson:gson:2.8.5'
//implementation 'com.loopj.android:android-async-http:1.4.9'
//implementacion de diseño
implementation "com.google.android.material:material:1.0.0-rc01"
implementation 'com.android.support:design:28.0.0'
}
afterEvaluate {
tasks.matching {
it.name.startsWith('dex')
}.each { dx ->
if (dx.additionalParameters == null) {
dx.additionalParameters = []
}
dx.additionalParameters += '--multi-dex' // enable multidex
dx.additionalParameters += "--main-dex-list=$projectDir/multidex.keep".toString()
}
}
apply plugin: 'com.google.gms.google-services'
在模块httpcore-4.2.5.jar(org.apache.httpcomponents:httpcore:4.2.5)和httpcore-4.3.3.jar(httpcore-4.3.3。)中找到了重复的类org.apache.http.ConnectionClosedException。罐) 在模块httpcore-4.2.5.jar(org.apache.httpcomponents:httpcore:4.2.5)和httpcore-4.3.3.jar(httpcore-4.3.3.jar)中找到重复的类org.apache.http.ConnectionReuseStrategy 在模块httpcore-4.2.5.jar(org.apache.httpcomponents:httpcore:4.2.5)和httpcore-4.3.3.jar(httpcore-4.3.3.jar)中找到重复的org.apache.http.Consts类/ p>