Android studio Error converting result java.lang.NullPointerException: lock == null [closed]

1

I was finishing programming a connection to a remote database, but as soon as I hit the app, it loads a few seconds checking the connection and closes the app, I do not know the reasons, I have downloaded several missing libraries and other versions of android and the same error appears

    
asked by Jorge A. Gil Carrillo 24.08.2016 в 23:10
source

2 answers

1

This problem

  

NullPointerException: lock == null

is related to when you instantiate a InputStreamReader () you use a null value of FileInputStream :

FileInputStream myFileInputStream = null;
InputStreamReader myInputStreamReader = new InputStreamReader(myFileInputStream);

In fact it seems to me that later you try to use JsonParser and that's why you get this message:

  

JsonException parsing error: End of input at character 0 of

    
answered by 25.08.2016 в 21:04
0

The error is in the way you are processing the response. Before giving it a format or doing some process, check that the result is a string to print it in log .

    
answered by 26.08.2016 в 05:54