error: package com.android.annotations does not exist

后端 未结 13 2378
南旧
南旧 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

    All you need to do is to replace 'import android.support.annotation.Nullable' in class imports to 'import androidx.annotation.Nullable;'

    Thats a common practice..whenever any import giving issue...remove that import and simply press Alt+Enter on the related class..that will give you option to 'import class'..hint Enter and things will get resolved...

提交回复
热议问题