无法在直接启动模式下初始化工人
我是Workmanager的新手,我对存储保护有一个疑问。 提示:无法在直接启动模式下初始化工人。 我搜索了很长时间来找到:
androidmanifest.xml
<application
android:defaultToDeviceProtectedStorage="true"
android:directBootAware="true">
我的应用程序是启动开始,所以我需要这两个属性,但是我不知道如何解决这个问题,我找不到有问题的条目配置Workmanager存储。
我不知道该怎么办,我不能使用工人吗?
I am new to WorkManager and I have a question about storage protection.
Tip: Cannot initialize WorkManager in direct boot mode.
I searched for a long time to find that:
AndroidManifest.xml
<application
android:defaultToDeviceProtectedStorage="true"
android:directBootAware="true">
My app is a boot start, so I need these two properties, but I don't know how to solve this problem, I can't find the entry that has the problem of configuring WorkManager storage.
I don't know what to do now, can't I use WorkManager?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用2.7.1更新Workmanager,并实现按需初始化它应该起作用。请从清单文件中删除Workmanger初始化 -
提供者
android:name =“ androidx.startup.initialization -provider”
Android:当局=“ $ {applicationId} .androidx-startup”
工具:node =“ remove”&gt;
提供者
update workmanager with 2.7.1 and implement ondemand initialization it should work. please remove workmanger initialization from manifest file-
provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
tools:node="remove">
provider