Closed paranoiasystem closed 6 years ago
I had a similar issue. Can you show your dependencies list?
Some of the issues I saw in your code: 1) First of all in the UtentiRepository constructor you don't need to pass null anymore. If you check the super class only accepts to parameters so you can do this instead:
super("utenti", Utenti.class);
also make sure that on your server backend you have named the user object utenti while creating it. Because when you do the login Java invokes the http://xxxxxx.marcoferraioli.com:3000/api/utenti/login and if its name is different than utenti it will not know what to actually do and most probably return the error you are receiving.
2) Second make that your User model implements all the getters and setters and additional fields with their according types other than the normal strongloop User
3) You don't really need to implement the LoginCallBack interface in your UserRepository just do this instead:
utentiRepo.loginUser(username , password , new com.strongloop.android.loopback.UserRepository.LoginCallback<Utenti>()
I hope my answer is helpful. Happy coding!
Need to add Kotlin proguard rules to solve this problem.
I have created a model based on User. In my java code I have created these classes: Utenti.java
UtentiRepository.java
this is part of code of the activity where I make to login
But where i try to login I receive this error:
Sorry for my bad English