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 https://api.backendless.com/…/…/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
{“isLock”:false,“lastLogin”:1542316376748,“userStatus”:“ENABLED”,“mobileNumber”:“000000”,“created”:1536652808093,“name”:“ali”,“ownerId”:"…",“socialAccount”:“BACKENDLESS”,“updated”:1542315500173,“email”:“ali@a.com”,“objectId”:“0B3CA4E0-738D-59FE-FFE2-5370226B0100”,"___class":“Users”,“relatedDevices”:[{“created”:1536687505034,“adminStatus”:true,“ownerId”:null,“lockName”:"…",“updated”:1536687911414,“favorite”:true,“objectId”:“46FC8BD5-4347-E0E1-FFEA-605D16A8CA00”,"___class":“UserLock”},{“created”:1536688112589,“adminStatus”:true,“ownerId”:null,“lockName”:"…",“updated”:1536688117809,“favorite”:false,“objectId”:“54BFF574-3705-D09D-FF14-D357D278CC00”,"___class":“UserLock”}],“user-token”:"…"}
<-- 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.