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)