Skip to content Skip to sidebar Skip to footer

Null Pointer Exception While Running Doinbackground Method

i am trying to upload a file to dropbox, i have a also create a progress bar to check its status but while executing it throws exception . i created a object of UploadFile class an

Solution 1:

Make sure you properly initialize

UploadRequest mApi;

as not doing so will cause a NullPointerException when the onClick method is called.

Solution 2:

Put a break point on the line where you have the exception and debug your application. When it stops there, check all the variable values you are using on that line. If one or more is null, there is your error. Those are the variables that you forget to initialize before using in that method.

Post a Comment for "Null Pointer Exception While Running Doinbackground Method"