在收缩期间发现警告,请使用-dontwarn或-ignorewarnings来抑制它们

时间:2018-05-22 05:19:24

标签: android proguard

如何解决此错误?我们尝试清理和重建,重新启动android studio并没有用。 错误:任务':app:transformClassesWithAndroidGradleClassShrinkerForDebug'执行失败。

  

收缩时发现警告,请使用-dontwarn或-ignorewarnings来抑制它们。

我们正在使用这个lib

<LinearLayout android:id="@+id/linearLayout3"
android:layout_height="wrap_content" 
android:orientation="horizontal"
android:layout_width="match_parent">

<ImageButton 
  android:layout_height="wrap_content"
  android:id="@+id/clear"
  android:layout_width="0dp"
  android:layout_weight=".5" />

 <ImageButton 
 android:layout_height="wrap_content"
 android:id="@+id/submit" 
 android:layout_width="0dp"
 android:layout_weight=".5" />
 </LinearLayout>

//聊天     编译&#39; com.github.timigod:android-chat-ui:v0.1.3&#39;

implementation 'com.google.android.gms:play-services-maps:9.8.0'
    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'
    })
    compile 'de.hdodenhof:circleimageview:2.2.0'
    compile('com.alibaba.android:ultraviewpager:1.0.6.1@aar') {
        transitive = true
    }
    compile('org.apache.httpcomponents:httpmime:4.3.6') {
        exclude module: 'httpclient'
    }
    compile 'com.littlechoc.cornerlabel:cornerlabel:1.0.0'
    compile 'com.synnapps:carouselview:0.1.4'
    compile 'com.sun.mail:android-mail:1.5.5'
    compile 'com.sun.mail:android-activation:1.5.5'
    implementation 'com.muddzdev:styleabletoast:2.0.2'
    compile 'javax.annotation:javax.annotation-api:1.2'
    compile 'me.grantland:autofittextview:0.2.+'
    // base library
    //slider
    compile 'com.ss.bannerslider:bannerslider:1.8.0'
    //noinspection GradleCompatible
    compile 'jp.wasabeef:recyclerview-animators:2.2.7'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.google.code.gson:gson:2.6.2'
    compile 'com.github.satyan:sugar:1.4'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support:percent:26.1.0'
    compile 'com.google.code.gson:gson:2.6.2'
    compile 'com.github.satyan:sugar:1.4'
    compile 'jp.wasabeef:recyclerview-animators:2.2.6'
    compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.+'
    compile 'com.afollestad.material-dialogs:core:0.9.4.2'
    compile 'com.google.android.gms:play-services:9.8.0'
    compile 'com.google.android.gms:play-services-auth:9.8.0'
    compile 'com.google.android.gms:play-services-location:9.8.0'
    compile 'com.google.firebase:firebase-core:9.8.0'
    compile 'com.google.firebase:firebase-auth:9.8.0'
    compile 'com.google.firebase:firebase-database:9.8.0'
    compile 'com.google.firebase:firebase-config:9.8.0'
    compile 'com.google.firebase:firebase-crash:9.8.0'
    compile 'com.google.firebase:firebase-invites:9.8.0'
    compile 'com.google.firebase:firebase-storage:9.8.0'
    compile 'cn.pedant.sweetalert:library:1.3'
    compile 'at.blogc:expandabletextview:1.0.3'
    compile 'com.joanzapata.iconify:android-iconify-fontawesome:2.1.+'
    compile 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.github.bumptech.glide:glide:4.6.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
    compile 'com.android.support:design:26.1.0'
    compile 'com.android.support:cardview-v7:26.1.0'
    compile 'com.android.support:support-v4:26.1.0'
    compile 'com.android.support:recyclerview-v7:26.1.0'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.daimajia.slider:library:1.1.5@aar'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
    implementation 'com.android.support:design:26.1.0'
    compile 'com.sackcentury:shinebutton:0.2.0'
    compile 'com.crashlytics.sdk.android:crashlytics:2.9.1'
    compile 'com.makeramen:roundedimageview:2.3.0'
    implementation("com.mikepenz:materialdrawer:6.0.7@aar") {
        transitive = true
    }
    compile 'com.plattysoft.leonids:LeonidsLib:1.3.2'
    //permission asking module
    implementation 'com.karumi:dexter:4.2.0'

// compile&#39; com.github.vipulasri:timelineview:1.0.5&#39;     编译&#39; com.ernestoyaquello.stepperform:vertical-stepper-form:0.9.9&#39;

compile 'com.airbnb.android:lottie:2.5.1'

// compile&#39; net.alhazmy13.MediaPicker:libary:2.4.0&#39;

//multiple image picjer is not working

// implementation&#39; com.github.bumptech.glide:glide:4.5.0&#39;     // annotationProcessor&#39; com.github.bumptech.glide:编译器:4.7.1&#39;

implementation 'com.github.esafirm.android-image-picker:imagepicker:1.12.0'
// for experimental rx picker
//implementation 'com.github.esafirm.android-image-picker:rximagepicker:1.12.0'
// If you have a problem with Glide, please use the same Glide version or simply open an issue

错误

compile 'com.commit451:PhotoView:1.2.4'
compile 'com.isseiaoki:simplecropview:1.0.13'
compile 'com.yongchun:com.yongchun.imageselector:1.1.0'

1 个答案:

答案 0 :(得分:3)

有时候(实际上大部分时间)Proguard都是偏执狂,因为它找不到一些参考文献。通常,在您确定已正确实现警告的情况下,可以忽略其警告。

要修复错误,您需要忽略com.yongchun这样的警告: 添加到您的Proguard规则-dontwarn com.yongchun.**