Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 1.0.0
belongs to Maven artifact androidx.annotation:annotation:1.0.0-rc01

Keep

public abstract @interface Keep
implements Annotation

androidx.annotation.Keep


Denotes that the annotated element should not be removed when the code is minified at build time. This is typically used on methods and classes that are accessed only via reflection so a compiler may think that the code is unused.

Example:


  @Keep
  public void foo() {
      ...
  }
 

Summary

Inherited methods