title: It is right thing to ignore warning in proguard android
body: <p>I started learning <strong>Proguard</strong> for android. After a bit of reading, i start trying to use in my project. When i start generating release build, i see lots of warnings and notes in android studio terminal. I know it totally depends on my code base and third party libraries i used.</p>
  
  <p>My Questions</p>
  
  <ul>
  <li><p><strong>I don't understand what these warning trying to say?</strong> But build will fail for sure and will not able to generate apk file. </p></li>
  <li><p>Surprisingly adding <code>-dontwarn packagename*</code> will ignore these warnings but again not sure it is safe thing to do. <strong>Is it always feasible to simply ignore those warning just by adding <code>-dontwarn</code></strong> ? </p></li>
  </ul>
  
  <blockquote>
    <p><strong>-dontwarn [class_filter]</strong></p>
    
    <p>Specifies not to warn about unresolved references and other important problems at all. The optional filter is
    a regular expression; ProGuard doesn't print warnings about classes
    with matching names. Ignoring warnings can be dangerous. For instance,
    if the unresolved classes or class members are indeed required for
    processing, the processed code will not function properly. <em>Only use
    this option if you know what you're doing!</em></p>
  </blockquote>
  
  <p>Well definitely at this point, i don't really know what i am doing. I would be very much appreciate if you could help me understand ;-) . </p>
  
  <h3>Retrofit2 warnings from my current project</h3>
  
  <blockquote>
    <p>Warning: retrofit2.OkHttpCall: can't find referenced class javax.annotation.concurrent.GuardedBy </p>
    
    <p>Warning: retrofit2.OkHttpCall:can't find referenced class javax.annotation.concurrent.GuardedBy</p>
    
    <p>Warning: retrofit2.OkHttpCall: can't find referenced class javax.annotation.concurrent.GuardedBy</p>
  </blockquote>
  
  <p>Simply turn off above warning by adding this line in <strong>proguard-rules.pro</strong></p>
  
  <blockquote>
    <p>-dontwarn retrofit2.**</p>
  </blockquote>