将AppWidgetProvider移动到不同的程序包名称下会破坏活动的窗口小部件 [英] Moving AppWidgetProvider under different Package name breaks active widgets

查看:68
本文介绍了将AppWidgetProvider移动到不同的程序包名称下会破坏活动的窗口小部件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在"com.developer.application"包下有一个AppWidgetProvider

I have an AppWidgetProvider under package "com.developer.application"

我尝试将此AppWidgetProvider移至"com.developer.application.widgets"包下这样做后,我更新了AndroidManifest中的所有引用以适应此移动.

I tried moving this AppWidgetProvider under package "com.developer.application.widgets" Upon doing so I updated all references in the AndroidManifest to accommodate the move.

将更改上传到设备后,当前在主屏幕上的小部件(与上述AppWidgetProvider关联)中断,并且永远显示正在加载"图形.

After uploading the changes to the device, the widgets (associated with the aforementioned AppWidgetProvider) that were currently on the home screen break and just forever show the "Loading" graphic.

我不知道我的指针/程序包路径有什么问题,因为如果将窗口小部件重新添加到主屏幕,则一切正常.

I know nothing is wrong with my pointers/package paths because if I re-add the widget to the home screen everything works fine.

简而言之,将AppWidgetProvider移至其他程序包并更新所有必要的引用仍然会破坏活动的主屏幕小部件.

So simply put, moving an AppWidgetProvider to a different package and updating all necessary references still breaks the active home screen widget(s).

有什么想法吗?谢谢!

马特.

推荐答案

我也经历过.

我的猜测是,启动器会保存小部件的类名称(包括程序包名称),因此在您更改它时它会中断.

My guess is that the launcher saves the class name of the widget (including package name), so it just breaks when you change it.

这篇关于将AppWidgetProvider移动到不同的程序包名称下会破坏活动的窗口小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆