0

내가 최근에 해당하는 버전, 성공적으로 Gradle을 구축 할 수있는 Gradle을위한 동일한 3.0.0에 안드로이드 스튜디오를 업데이트하지만 난 내 Gradle을 파일을 더 이상 여기 내 프로젝트를 실행입니다 캔트DexException : 여러 dex 파일이 Lorg/apache/http/params/HttpParamConfig를 정의합니다.

enter code here 
buildscript { 
repositories { 
    maven { url 'https://maven.fabric.io/public' } 
} 

dependencies { 
    classpath 'io.fabric.tools:gradle:1.+' 
} 

} 
apply plugin: 'com.android.application' 
apply plugin: 'io.fabric' 

repositories { 
maven { url 'https://maven.fabric.io/public' } 
mavenCentral() 
google() 
} 

    apply plugin: 'realm-android' 

    android 
    { 
     signingConfigs { 
      config { 
       keyAlias 'XXXX' 
       keyPassword 'XXXX' 
       storeFile 
     file('/XXX/XXX/XXXX/XXX.jks') 
       storePassword 'XXX' 
      } 
     } 
     compileSdkVersion 26 
     buildToolsVersion '26.0.2' 
     defaultConfig { 
      applicationId "www.XXX" 
      minSdkVersion 23 
      targetSdkVersion 26 
      versionCode 46 
      versionName "1.0" 
      testInstrumentationRunner 
      "android.support.test.runner.AndroidJUnitRunner" 
      multiDexEnabled true 
      vectorDrawables.useSupportLibrary = true 
      javaCompileOptions { 
       annotationProcessorOptions { 
        includeCompileClasspath false 
       } 
      } 
     } 
     buildTypes { 
      release { 
       minifyEnabled false 
       proguardFiles getDefaultProguardFile('proguard- 
       android.txt'), 'proguard-rules.pro' 
       signingConfig signingConfigs.config 
      } 
     } 
     dexOptions { 
      javaMaxHeapSize "4g" 
      preDexLibraries = false 
     } 
     packagingOptions { 
      exclude 'META-INF/DEPENDENCIES.txt' 
      exclude 'META-INF/LICENSE.txt' 
      exclude 'META-INF/NOTICE.txt' 
      exclude 'META-INF/NOTICE' 
      exclude 'META-INF/LICENSE' 
      exclude 'META-INF/DEPENDENCIES' 
      exclude 'META-INF/notice.txt' 
      exclude 'META-INF/license.txt' 
      exclude 'META-INF/dependencies.txt' 
      exclude 'META-INF/LGPL2.1' 
     } 
     configurations.all { 
      resolutionStrategy.force 
      'com.google.code.findbugs:jsr305:1.3.9' 
      all*.exclude group: 'org.apache.commons' 

     } 
     compileOptions { 
      sourceCompatibility JavaVersion.VERSION_1_8 
      targetCompatibility JavaVersion.VERSION_1_8 
     } 
    } 

    dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    androidTestCompile('com.android.support.test.espresso:espresso- 
    core:2.2.2', { 
    exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    implementation project(':carpolo_sdk') 
    implementation project(':material-sheet-fab') 
implementation('org.eclipse.paho:org.eclipse.paho.android.service:1.0.2') { 
    exclude module: 'support-v4' 
} 
implementation 'com.android.support:multidex:1.0.2' 
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.1' 
implementation 'com.android.support:appcompat-v7:26.1.0' 
implementation 'com.google.android.gms:play-services:11.4.2' 
implementation 'com.android.support:design:26.1.0' 
implementation 'com.jakewharton:butterknife:8.6.0' 
implementation 'com.squareup.picasso:picasso:2.5.2' 
implementation 'com.android.support:cardview-v7:26.1.0' 
implementation 'com.android.support:support-v4:26.1.0' 
implementation 'com.amazonaws:aws-android-sdk-core:2.3.9' 
implementation 'com.amazonaws:aws-android-sdk-s3:2.3.9' 
implementation 'com.amazonaws:aws-android-sdk-cognito:2.3.9' 
implementation 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.3.9' 
implementation 'io.saeid:fab-loading:0.6.0' 
implementation 'com.google.firebase:firebase-messaging:11.4.2' 
implementation 'com.google.firebase:firebase-auth:11.4.2' 
implementation 'com.google.firebase:firebase-crash:11.4.2' 
implementation 'com.firebaseui:firebase-ui-auth:2.0.1' 
implementation 'com.google.android.gms:play-services-auth:11.4.2' 
implementation 'com.android.support.constraint:constraint-layout:1.0.2' 
implementation 'com.github.clans:fab:1.6.4' 
implementation 'com.github.florent37:singledateandtimepicker:1.1.0' 
implementation 'com.github.apl-devs:appintro:v4.2.0' 
implementation 'com.github.curioustechizen.android-ago:library:1.3.4' 
implementation 'me.relex:circleindicator:[email protected]' 
implementation 'com.github.Mariovc:ImagePicker:1.2.0' 
testCompile 'junit:junit:4.12' 
implementation 'com.google.guava:guava:22.0-android' 
implementation('com.crashlytics.sdk.android:crashlytics:[email protected]') { 
    transitive = true; 
    } 
} 
apply plugin: 'com.google.gms.google-services' 

내 자신감 Gradle을 파일에는 다음이 포함 내 코드에 어떤 도움을 주시면 감사하겠습니다 무슨 잘못 내가 찾을 수 없습니다

enter code here 
dependencies { 
compile "io.swagger:swagger-annotations:$swagger_annotations_version" 
compile "com.google.code.gson:gson:$gson_version" 
compile "org.apache.httpcomponents:httpcore:$httpcore_version" 
compile "org.apache.httpcomponents:httpmime:$httpmime_version" 
compile "org.apache.httpcomponents:httpclient- 
android:$httpclient_version" 
compile "com.android.volley:volley:${volley_version}" 
testCompile "junit:junit:$junit_version" 
testCompile "org.robolectric:robolectric:${robolectric_version}" 
testCompile "net.jodah:concurrentunit:${concurrent_unit_version}" 

}.

+0

Android Studio에서 프로젝트보기 (파일 구조를 보여주는보기, 일반적으로 Android라고 표시됨)로 전환합니다. 외부 라이브러리를 확장하고 어떤 라이브러리가 Apache lib를 사용하는지 확인하십시오. build.gradle의 종속성 목록에서 종속성 중 하나에서 Apache lib를 제외하십시오. – fejd

+0

@fejd 안녕하세요 남자가 내 편집 답변을 확인하고 답을 말할 수 있습니다. –

답변

0

.idea 폴더를 삭제했다는 문제를 해결하기 위해 라이브러리를 섞어서 정리 한 다음 프로젝트를 정리하고 다시 빌드하면 오류가 해결됩니다.