我们采用MSDK4.15在mobile-sdk-android4.15 demo的基础上进行开发。我们测试用M210...
Completed-
日志就收集到这些。除非下次再出现,不过就要等了。
我猜测会不会是我们调用方法的问题。
rtk.setStateCallback(new RTKState.Callback() {
@Override
public void onUpdate(@NonNull RTKState rtkState) {
// after connected with D-RTK2 station or NTRIP network, location info is already calculated
isRTKBeingUsed = rtkState.isRTKBeingUsed();
if (isRTKBeingUsed) {
if (!isRTKHaveBeUsed){
isRTKHaveBeUsed = true;
}
}
else{
if (!isRTKHaveBeUsed){
Calendar now = Calendar.getInstance();
if (rtkCloseTime.before(now)){
rtk.setStateCallback(null);
ToastUtils.showToast("rtk长时间连接不上,断开重连");
closeRtk((err)->{
initRtk();
});//长时间连接不上,则断开,重新连
}
}
//启动网络RTK服务
mRTKNetworkServiceProvider = DJISDKManager.getInstance().getRTKNetworkServiceProvider();
mRTKNetworkServiceProvider.startNetworkService(new CommonCallbacks.CompletionCallback() {
@Override
public void onResult(DJIError djiError) {
if(djiError != null){
FileLog.d(TAG, "startNetworkService ERROR: " + djiError.getDescription());
}
else{
FileLog.d(TAG, "startNetworkService 启动网络服务成功");
}
}
});
}
}
}); -
又闪退了。虽然概率不高,但是会发生。请问如何避免
java.util.concurrent.RejectedExecutionException: Task dji.internal.rtk.rtcm.fdd.fdd.nhf@916980 rejected from java.util.concurrent.ThreadPoolExecutor@50f1bb9[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2086)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:848)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1394)
at java.util.concurrent.Executors$DelegatedExecutorService.execute(Executors.java:630)
at dji.internal.rtk.rtcm.fdd.fdd.dgh.fdd(Unknown Source:35)
at dji.internal.rtk.rtcm.fdd.fdd.ghu.onConnect(Unknown Source:70)
at dji.internal.rtk.rtcm.fdd.fdd.koy.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:224)
at android.os.HandlerThread.run(HandlerThread.java:67)
Please sign in to leave a comment.
Comments
10 comments