Android Question HTTP Server Upload Error

GiovanniO

Member
Hello everyone. I'm having an error in the HTTP Server example. When I try to upload a file to my phone from a web browser (on my PC connected to the same network), I get this error:

HTTP ERROR: 500​

Problem accessing /upload/storage%2Femulated%2F0. Reason:

java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io_OutputStream.close()' on a null object reference

As I mentioned, it appears with the compiled example, meaning I haven't made any changes to it. Is there a solution?

Thank you very much for any help.

Best regards.
 
Top