android通过以下操作上传文件 主界面会卡死崩掉并且没有报错信息

LCFile file = LCFile.withAbsoluteLocalPath("avatar.jpg", "/tmp/avatar.jpg");
file.saveInBackground().subscribe(new Observer<LCFile>() {
    public void onSubscribe(Disposable disposable) {}
    public void onNext(LCFile file) {
        System.out.println("文件保存完成。URL:" + file.getUrl());
    }
    public void onError(Throwable throwable) {
        // 保存失败,可能是文件无法被读取,或者上传过程中出现问题
    }
    public void onComplete() {}
});

您好,要检查一下文件的路径,要使用绝对路径。

fun saveFileInLC(filename: String, path: String, attachmentClass: LCObject?, msg: String?, onSuccess: (LCFile) -> Unit = {}) {
        val file = LCFile.withAbsoluteLocalPath(filename, path)
        file.saveInBackground().subscribe(ObserverImpl<LCFile>(msg) {
            // 成功回调
            attachmentClass?.add("attachments", it)
            attachmentClass?.save()
        })
    }

不知道这里是不是有点bug,在android中只要我上传文件成功后,在回调中关联某个LCObject,主线程就会被卡死。