Support Topics Documentation Slack YouTube Blog

java.lang.NumberFormatException: Invalid double: "Users"

(morteza hosseini) #1

Hi, i send a request and get a response with error: help me why this error occur?

java.lang.NumberFormatException: Invalid double: “Users”

Android Studio Log:

D/OkHttp: <-- 200 OK…/…/users/login (2296ms)
Server: nginx
Date: Thu, 15 Nov 2018 21:12:56 GMT
Content-Type: application/json
Content-Length: 780
Connection: keep-alive
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Origin, application-type, Content-Type, request, user-token, auth-key
Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE, PATCH
Expires: Thu, 01 Jan 1970 00:00:01 GMT
Cache-Control: no-cache
Cache-Control: : no-store, no-cache, must-revalidate, private
D/OkHttp: Pragma: : no-cache
<-- END HTTP (780-byte body)
I/LoginFragment: java.lang.NumberFormatException: Invalid double: “Users”

(Mark Piller) #2
  1. Do you use our Android library in your app?
  2. Can you login with the same account in REST Console (see here for an example)

(morteza hosseini) #3

No, i used rest api because my min sdk is 19 and min sdk for android library is 21; as you see in response Login done successful because i get back user-token, but in my app i failed because response not match with our Model i set to response; but i do not know where is the problem exactly: in my model, in response, in schema of table?

(morteza hosseini) #4

my problem solved. Model had a property with int type but response had same property with String type, so model could not match with response and i got this error, thank you.