You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
首先感谢大佬的框架,集成到项目中挺方便的。最近在使用中碰到一些问题,咨询一下。
1.我这边返回的数据格式就是那种有 code,message,data 的样子
2.所以我网络请求一般都是用自动脱壳的方式,但是这边有个问题是,当返回的数据 data 是 null的时候,app就会奔溃
报错信息:
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter it
首先感谢大佬的框架,集成到项目中挺方便的。最近在使用中碰到一些问题,咨询一下。
1.我这边返回的数据格式就是那种有 code,message,data 的样子
2.所以我网络请求一般都是用自动脱壳的方式,但是这边有个问题是,当返回的数据 data 是 null的时候,app就会奔溃
报错信息:
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter it
此处的 it 是请求成功后,在 parseState(resultState,{ 这里的it })
3. 用不脱壳的方式应该是ok的,因为自己可以处理进行判空呀啥的。但是所有的请求接口,总会有的接口有时候返回 null 有时候有数据,这样的话岂不是所有的接口都需要使用不脱壳的方式嘛。
4.咨询一下大佬有没有更好的解决方式,或者怎么弄会更合理
The text was updated successfully, but these errors were encountered: