1***@qq.com
1***@qq.com
  • 发布:2021-05-13 15:04
  • 更新:2023-03-03 13:00
  • 阅读:311

uniapp 里,怎么重写AsyncTask 里面的方法,如doInBackground

分类:uni-app
 const AsyncTask = plus.android.importClass('android.os.AsyncTask')  
      const doInBackgrounds = plus.android.implements('java.lang.Object', {  
        doInBackground: function () {  
          console.log('doInBackground')  
        }  
      })  

      // doInBackground  
      const newAsyncTask = new AsyncTask(doInBackgrounds)  
      newAsyncTask.execute()
2021-05-13 15:04 负责人:无 分享
已邀请:
2***@qq.com

2***@qq.com

哪位大神能回答一下,我也用到了AsyncTask。用plus.android.implements("java.lang.Runnable", { ... 会导致UI卡死

鑫辰大海

鑫辰大海

请问你解决了吗?

要回复问题请先登录注册