我一直在嘗試將亞馬遜SNS客戶端與一個android項目集成。與android包衝突 - 亞馬遜SNS
我使用以下依賴包括庫命令
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.amazonaws:aws-java-sdk-sns:1.10.+'
compile 'com.google.android.gms:play-services:7.5.0'
}
因此它自動包括上述庫(和它的相關性: aws_java_sdk_core和aws_java_sdk_sqs)。所有3個庫都有版本1.10.2。
的問題是,在AWS芯具有兩個模塊
- 共享記錄(共享記錄:共享記錄:1.1.3)
- 的HttpClient(org.apache.httpcomponents:HttpClient的:4.3 .6)
由於android在內部具有相同的包,因此它不包括這些模塊 以避免任何衝突。結果是,當aws代碼嘗試從這些模塊訪問某些類時。 Tt期待它的不同版本,沒有找到預期的方法,並使應用程序崩潰。
有什麼辦法可以重寫android的排除嗎? (或者是有一個更好的方式來處理這種情況?)
編輯:新增gradle這個日誌:
WARNING: Dependency commons-logging:commons-logging:1.1.3 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: Dependency org.apache.httpcomponents:httpclient:4.3.6 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: Dependency commons-logging:commons-logging:1.1.3 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: Dependency org.apache.httpcomponents:httpclient:4.3.6 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
扮演魔鬼的代言人,你的項目中是否會有一些代碼需要這些Apache JAR的Android版本? –
添加gradle日誌! –
你能否發佈崩潰日誌以及 –