Warning:not Annotated parameter overrides @NonNull parameter
This address: Http://blog.csdn.net/caroline_wendy
Warning:the @NonNull annotation can is used to indicate, a given parameter can not be null.
The meaning of "@NonNull" is that the comment is non-null, and if the above warning appears, the parameter should have a non-empty callout; as added:
public void OnReceive (@NonNull context context, @NonNull Intent Intent);
Specific:It's an annotation, and the correct name is nonnull:
protected void Onsaveinstancestate (@NonNull Bundle outstate)(and also)import Android.support.annotation.NoNNull;
The compiler to warn when certain assumptions was being violated (such as a parameter of a Met purpose Hod that should always has a value, as in this particular case, although there is others). From the Support Annotations documentation:
The @NonNull annotation can used to indicate, a given parameter can not be null.
If A local variable is known to being null (for example because some earlier code checked whether it's null), and you P The parameter to a method where this parameter is marked as @NonNull, the IDE would warn you have a pote Ntial crash.
They is tools for static analysis. Runtime behavior is isn't altered at all.
Reference: http://stackoverflow.com/questions/24728627/ Meaning-of-android-studio-error-not-annotated-parameter-overrides-notnull-para
Android-warning:not Annotated parameter overrides @NonNull parameter