Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot resolve symbol nullable

Tags:

android

Getting cannot resolve symbol nullable error for my program. @androidx.annotations.Nullable - nullable has redline under it.

package com.singularity.birdjumper;

import android.app.Activity;
import android.os.Bundle;

public class GameActivity extends Activity
{
    @Override
    protected void onCreate(@androidx.annotation.Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }
}
like image 821
john smith Avatar asked Dec 24 '22 01:12

john smith


1 Answers

just add this import statement

import android.support.annotation.Nullable;

For androidx, the import statement should be:

import androidx.annotation.Nullable;
like image 58
Bala Ganesh Avatar answered Dec 25 '22 22:12

Bala Ganesh