Android使用视频上传sdk代码空指?

  • 回答 (1)
  • 关注 (0)
  • 查看 (47)

我可以实现一个完整上传,但当一段视频在上传的过程中销毁页面,再次进入重新开始上传时,会报这个错误,uploadPartRequestLongMap.get(uploadPartRequest),无论在页面的ondestroy方法中使不使用 mVideoPublish.canclePublish();同样会报错,求帮忙,下面我贴出报错代码

03-25 14:17:18.983 22014-22863/? E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatche

Process: yueyetv.com.bike, PID: 22014

java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object java.util.Map.get(java.lang.Object)' on a null object reference

at com.tencent.cos.xml.transfer.MultipartUpload$2.onProgress(MultipartUpload.java:249)

at com.tencent.qcloud.core.network.request.serializer.RequestFileBodySerializer$1.onProgress(RequestFileBodySerializer.java:63)

at com.tencent.qcloud.core.network.request.body.FileRequestBody.writeTo(FileRequestBody.java:83)

at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:62)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)

at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)

at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)

at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)

at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)

at com.tencent.qcloud.core.network.interceptors.NetworkConnectionRetryInterceptor.intercept(NetworkConnectionRetryInterceptor.java:53)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)

at com.tencent.qcloud.core.network.interceptors.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:223)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)

at com.tencent.qcloud.core.network.interceptors.RequestSerializeInterceptor.intercept(RequestSerializeInterceptor.java:43)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)

at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)

at okhttp3.RealCall$AsyncCall.execute(RealCall.java:135)

at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)

at java.lang.Thread.run(Thread.java:760)

03-25 14:17:19.359 463-2431/? E/ANDR-PERF-OPTSHANDLER: perf_lock_rel: updated /sys/class/scsi_host/host0/../../../clkscale_enable with 1

return value 2。

用户1547870用户1547870提问于
大力发达回答于

尝试在空对象引用上调用接口方法'java.lang.Object java.util.Map.get

扫码关注云+社区