Use apply spread function error

I have some problems using apply. The code is below. I compiled an error at. / gradlew bundleRelease.I’m not sure what I did wrong… Can anyone help me?
---------------------split line -----------------------------

 view.findViewById<View>(R.id.check_update).apply {
        setOnClickListener {
            mUpdateDisposable?.dispose()
            mUpdateDisposable = CrucioApi.getConstant().compose(NetTransformer.ioToMain())
                .doOnSubscribe {
                    LoadingDialogFragment.newInstance(true).showLoading(fragmentManager)
                }
                .doFinally {
                    LoadingDialogFragment.dismissLoading(fragmentManager)
                }
                .subscribe(
                    Consumer {
                        ApiConstants.saveServiceConstant(it)
                        val isUpdate = AppUpdateChecker().checkRCUpdate(activity)
                        if (!isUpdate) {
                            Toaster.toastShort("${App.getContext().getString(R.string.app_update_is_latest)}(${BuildConfig.VERSION_NAME}-${CommonUtil.getAppFlavor()},${DeviceInfoManager.getInstance().hybridVersion})")
                        }
                    }, ApiErrorConsumer.error { message ->
                        Toaster.toastShort(message)
                    }
                )
        }

        setOnLongClickListener {
            Toaster.toastShort("${BuildConfig.VERSION_NAME}-${CommonUtil.getAppFlavor()},${DeviceInfoManager.getInstance().hybridVersion}")
            return@setOnLongClickListener true
        }
    }

What error do you get, at what line?