我正在尝试打电话PUT
方法在我的Retrofit
实例:
Response<UpdateUserProfileResponse> response = App.getService().updateUserProfile(//A good 26 parameters).execute();
中的参数updateUserProfile()
是字符串、布尔值和一个的混合List<MyObject>
。当我调用此方法时,出现以下错误:
Throwing new exception 'length=238; index=1366' with unexpected pending exception: java.lang.ArrayIndexOutOfBoundsException: length=238; index=1366
06-28 21:53:12.458 3928-6610/com.subby.development A/art: art/runtime/thread.cc:1329] at retrofit2.Response
Update
我发现了这个问题。那里有两个RealmList<BackgroundString>
导致问题的原因。当我评估两个 RealmList 时,我得到:
Unable to evaluate the expression method threw 'java.lang.IllegalStateException' exception.
对于其他偶然发现这个问题的人来说,实际问题很可能是这样的:https://issuetracker.google.com/issues/37078190 https://issuetracker.google.com/issues/37078190即 Marshmallow/23(甚至可能是 24)上的 Instant Run 在 Android 运行时存在问题。 Android 8/26+ 有官方修复,但对于大多数人来说,禁用 Instant Run 就足够了。
also re:
https://github.com/square/retrofit/issues/1486 https://github.com/square/retrofit/issues/1486
https://github.com/square/retrofit/issues/1506 https://github.com/square/retrofit/issues/1506
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)