2017-02-07 7 views
1

paytabs支払いゲートウェイを統合する必要があります。 sdkモジュールを統合した後、アプリケーションがビルドされていない&アプリケーションがエラーを取得します。私のアプリのgradleは以下の依存関係を持っています。私は2つの依存関係の下に削除した場合、私はすべてのエラーを取得しない :Paytab支払いゲートウェイが作動しない

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: okhttp3/Address.class

更新:

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:24.2.1' 
    compile 'com.android.support:design:24.2.1' 
    compile 'com.google.android.gms:play-services:9.8.0' 
    compile 'com.squareup.retrofit2:retrofit:2.1.0' 
    compile 'com.squareup.retrofit2:converter-gson:2.0.2' 
    compile 'de.hdodenhof:circleimageview:1.3.0' 
    compile 'com.google.code.gson:gson:2.6.1' 
    compile 'com.android.support:multidex:1.0.1' 
    compile 'com.afollestad.material-dialogs:core:0.9.1.0' 
    compile 'com.kyleduo.switchbutton:library:1.4.4' 
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5' 
    compile project(':PayTabs_SDK_SRC') 
} 

エラーは次のように見えます。しかし、これを使用する必要があります レトロフィット依存。何か案が?

compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'

+0

あなたは私はあなたがアンドロイドSDKのzipファイルを共有してくださいすることができZIP –

+0

を見つけることができませんジップダウンロードリンク を共有することができますか? – sukhbir

答えて

1

見て、PayTabs SDKは com.squareup.okhttp3(version 3.5.0)とcom.squareup.retrofit2が含まれています改造:2.2.0は、Gradleのを混同してdexException(重複したファイルの例外)を生成okhttp3(version 3.6.0)を使用しています。

この問題を解決するには、okhttp3バージョンの1つを除外する必要があります。 build.gradleファイルの以下の行を置き換えます。これらのコード行で

compile 'com.squareup.retrofit2:retrofit:2.1.0' 
compile 'com.squareup.retrofit2:converter-gson:2.0.2' 

compile ('com.squareup.retrofit2:retrofit:2.2.0'){ 
    exclude group: "com.squareup.okhttp3" 
} 
compile ('com.squareup.retrofit2:converter-gson:2.2.0'){ 
    exclude group: "com.squareup.okhttp3" 
} 

それが動作します願っています。

+0

あなたが共有するzipダウンロードリンク私はZIPを見つけることができません –

関連する問題