依赖性commons-logging:commons-logging:1.2因调试而被忽略,因为它可能与Android提供的内部版本冲突

时间:2015-08-28 03:32:11

标签: android gradle runtime-error

我收到以下警告

  

警告:依赖性commons-logging:commons-logging:1.2被忽略   调试,因为它可能与提供的内部版本冲突   Android系统。如果有问题,请用jarjar重新打包以更改类包

依赖项“commons-logging:commons-logging:1.2”甚至不在我的gradle文件中。

2 个答案:

答案 0 :(得分:5)

我认为你应该从包含它的任何依赖项中排除commons-logging。它会是这样的:

compile ('<name-of-the-package-that-has-as-dependency-commons-logging>') {
    exclude group: 'commons-logging', module: 'commons-logging'
}

答案 1 :(得分:0)

apply plugin: 'com.android.application'android {   
 compileSdkVersion 22    
 buildToolsVersion "22.0.1"    
 defaultConfig {        
 applicationId "com.milople.useraudio"        
 minSdkVersion 15        
 targetSdkVersion 22       
 versionCode 1       
 versionName "1.0"       
 multiDexEnabled true    
}  
  packagingOptions {        
             exclude 'META-INF/LICENSE.txt'      
             exclude 'META-INF/NOTICE.txt'      
  }   
 buildTypes {        
            release {            
                 minifyEnabled true            
proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'       
 }   
 }      
compileOptions {          
sourceCompatibility JavaVersion.VERSION_1_7      
targetCompatibility JavaVersion.VERSION_1_7    
}}
buildscript {    
repositories{ 
           maven { url 'https://maven.fabric.io/public' }           
}
dependencies {       
 classpath 'io.fabric.tools:gradle:1.+'    
}}
apply plugin: 'io.fabric'repositories { 
   maven { url 'https://maven.fabric.io/public' }}
dependencies {    
compile fileTree(dir: 'libs', include: ['*.jar'])    
compile 'com.android.support:appcompat-v7:22.0.0+'   
compile 'com.android.support:recyclerview-v7:22.1.1'    
compile 'com.android.support:cardview-v7:22.1.1'    
compile files('libs/PayPalAndroidSDK-2.9.8.jar')   
compile 'de.hdodenhof:circleimageview:1.2.1'    
compile 'com.google.code.gson:gson:2.3.1'    
compile 'com.facebook.android:facebook-android-sdk:4.1.0'     
compile('com.twitter.sdk.android:twitter:1.7.2@aar') {
transitive = true;    
}    
compile 'com.google.android.gms:play-services:6.5.87'    
compile 'com.eftimoff:android-pathview:1.0.6@aar'   
compile 'com.dwolla:dwolla-java-sdk:2.0.5'   
compile 'org.apache.httpcomponents:httpmime:4.2.5'
compile 'com.sothree.slidinguppanel:library:3.1.1'  
compile 'com.squareup:otto:1.3.5'  
}