Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/230.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 安卓6上的改型2设置零路径参数_Android_Kotlin_Retrofit2 - Fatal编程技术网

Android 安卓6上的改型2设置零路径参数

Android 安卓6上的改型2设置零路径参数,android,kotlin,retrofit2,Android,Kotlin,Retrofit2,我使用的是翻新2库版本2.3.0,突然它开始用零而不是实际的数字替换整数路径参数 我使用的是Kotlin(1.2.21),我有一个类似的方法: @GET("posts/{postId}") fun getPosts(@Path("postId") postId: Long): Single<Post> @GET(“posts/{postId}”) 有趣的getPosts(@Path(“postId”)postId:Long):单个 这是应该的,但现在当我在Android 6上运行

我使用的是翻新2库版本2.3.0,突然它开始用零而不是实际的数字替换整数路径参数

我使用的是Kotlin(1.2.21),我有一个类似的方法:

@GET("posts/{postId}")
fun getPosts(@Path("postId") postId: Long): Single<Post>
@GET(“posts/{postId}”)
有趣的getPosts(@Path(“postId”)postId:Long):单个
这是应该的,但现在当我在Android 6上运行我的应用程序时(包括设备和模拟器),
postd
path参数始终为零,即调用
posts/0
。安卓7和8很好。改型和OkHttp版本没有改变,界面也没有改变

我已经查看了构建请求,内部的
OkHttpCall
具有
args
数组,其中一个值为
Long
,值为0。这只适用于Android 6,其他版本都有正确的值。
ServiceMethod
在界面中设置了正确的URL,并且它有一个
参数处理程序
,用于
内置Converter.ToString Converter
类型的
postId


应用程序是多索引的,未使用ProGuard。可能会发生什么?

这是由即时运行引起的。在我禁用它之后,它的改装效果非常好