error: package com.android.annotations does not exist

后端 未结 13 2364
南旧
南旧 2020-12-13 11:55

I have the following class

import com.android.annotations.NonNullByDefault;

@NonNullByDefault
public final class Log {
    ...
}

and here

13条回答
  •  我在风中等你
    2020-12-13 12:38

    Annotations come from the support's library which are packaged in android.support.annotation.

    As another option you can use @NonNull annotation which denotes that a parameter, field or method return value can never be null.
    It is imported from import android.support.annotation.NonNull;

提交回复
热议问题