1

I have class that extends AsyncTask :

    public class DailyCourse extends AsyncTask<Integer, Void , Object> {
           public DailyCourse (){
           }
    }

I have Override necessary functions and have my own functions too .

in main activity that implements my custom interface I try to call constructor :

    public class Luncher extends AppCompatActivity implements DailyCourseAsyncResponse {
              dailyCourse = new DailyCourse() ;
    }

note that I do this after onCreate and problem is I get this error :

      java.lang.NullPointerException: Attempt to invoke virtual method 
     'java.lang.String android.content.res.Resources.getString(int)' on a 
      null object reference

what is the problem ? NOTE : it's not duplicate with this , I know what is null exception , the problem "was" I did not know why I get that in my case (solved)

sasan
  • 111
  • 11

1 Answers1

0

I found the problem ! as @RobertK mentioned I was trying to access resources in a wrong way somewhere. and "somewhere" is one of my class private final properties that I was trying to set value in wrong way . ( my Resource object was null )

sasan
  • 111
  • 11