Reputation: 23
This is the logcat window. I do not understand the problem. Is this the database error or a server error, because I have checked the code many times. when I add the item to the cart it shows in the logcat. please help to rectify.
thanks in advance.
01-11 18:07:02.271: E/Volley(29037): [15630] NetworkDispatcher.run:Unhandled exception java.lang.RuntimeException: Bad URL null
01-11 18:07:02.271: E/Volley(29037): java.lang.RuntimeException: Bad URL null
01-11 18:07:02.271: E/Volley(29037):at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:127)
01-11 18:07:02.271: E/Volley(29037):at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:110)
01-11 18:07:02.271: E/Volley(29037): Caused by: java.net.MalformedURLException: Protocol not found: null
01-11 18:07:02.271: E/Volley(29037):at java.net.URL.<init>(URL.java:176)
01-11 18:07:02.271: E/Volley(29037):at java.net.URL.<init>(URL.java:125)
01-11 18:07:02.271: E/Volley(29037):at com.android.volley.toolbox.HurlStack.performRequest(HurlStack.java:101)
01-11 18:07:02.271: E/Volley(29037):at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:93)
01-11 18:07:02.271: E/Volley(29037):... 1 more
Upvotes: 2
Views: 1062
Reputation: 938
The Url you are trying to include in your code is either null or invalid which lags protocol likehttp://
or https://
plus you haven't handled any kind of exceptions that are likely to happen in such cases!
I would suggest you to go thru these Solutions posted in another thread.
Upvotes: 1
Reputation: 720
Your URL is coming as null and you are not handling exception also.
run:Unhandled exception java.lang.RuntimeException: Bad URL null
Upvotes: 2