0
我在我的應用程序中使用了2個庫,它們有一些常見的jar文件。 因此,當我試圖編譯我的應用程序時,我得到了重複條目異常。我試圖排除這些jar在build.gradle該特定的庫項目。 我寫的代碼是Android - 如何在我們的應用程序中排除庫的jar文件?
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.5.0'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.google.android.gms:play-services:8.3.0'
compile(project(':JIRAConnect')) {
exclude module: 'org.apache.httpcomponents:httpcore'
exclude module: 'org.apache.httpcomponents:httpclient'
exclude group: 'com.nostra13', module: 'universalimageloader'
}
compile (project(':..:GlobalLib:MyGlobalLib')){
exclude module: 'org.apache.httpcomponents:httpcore'
exclude module: 'org.apache.httpcomponents:httpclient'}
誰能給我解決?在此先感謝
你想刪除那些jar文件 –
確保重複庫是相同的版本。 –
只需使用相同的版本,或使用maven依賴項更改jar –