0

私は最近成功し、対応するバージョンへのGradleで同じ3.0.0へのGradleビルドをアンドロイドスタジオを更新しますが、私はもうここに私のプロジェクトを実行するカントは私の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スタジオでは、プロジェクトビュー(ファイル構造を示すビューで、通常Androidと表示されます)に切り替えます。外部ライブラリを展開し、どのライブラリがApache libを使用しているかを確認します。 build.gradleの依存関係リストで、依存関係の1つからApache libを除外します。 – fejd

+0

@fejdねえ、私の編集の回答を確認して、あなたの答えを関連付けることができます –

答えて

0

.ideaフォルダを削除したことを解決するために更新を行ったので、ライブラリが混在していましたが、プロジェクトをクリーンにして再構築してもエラーは解決されました。

関連する問題