y***@qq.com
y***@qq.com
  • 发布:2024-03-30 15:25
  • 更新:2024-03-30 15:25
  • 阅读:157

uniapp andorid原生开发,扩展 Module的方式如何使用databinding

分类:uni-app

使用databinding和viewmodel构建的项目,成功云端打包后,打开原生页面发生了错误
在manifest.json中添加了

"buildFeatures": {  
    "dataBinding": true,  //开启dataBinding  
    "viewBinding": true   //开启viewBinding  
}

报错的代码()

    @Override  
    protected TaskDetailViewModel createViewModel() {  
        return new ViewModelProvider(this).get(TaskDetailViewModel.class);  
    }

报错信息
No direct method <init>(Landroidx/lifecycle/ViewModelStoreOwner;)V in class Landroidx/lifecycle/ViewModelProvider; or its super classes (declaration of 'androidx.lifecycle.ViewModelProvider' appears in /data/app/~~PIqjgpkPjaNp2_Q5Lym5kA==/com.cetc28.appWpCNPC-Am2aynW2p2q67RgsY1y5Gw==/base.apk)

2024-03-30 15:25 负责人:无 分享
已邀请:

要回复问题请先登录注册