我使用Launcher2 home screen
作为定制主屏幕的基础。我想用默认的小部件定制 Android 主屏幕。
但是当我使用这个例子时,我得到了这个错误:
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): Problem allocating appWidgetId
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): java.lang.SecurityException: bindGagetId appWidgetId=68 provider=ComponentInfo{com.android.protips/com.android.protips.ProtipWidget}: User 10081 does not have android.permission.BIND_APPWIDGET.
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): at android.os.Parcel.readException(Parcel.java:1322)
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): at android.os.Parcel.readException(Parcel.java:1276)
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): at com.android.internal.appwidget.IAppWidgetService$Stub$Proxy.bindAppWidgetId(IAppWidgetService.java:470)
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): at android.appwidget.AppWidgetManager.bindAppWidgetId(AppWidgetManager.java:337)
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): at com.android.launcher2.LauncherProvider$DatabaseHelper.addAppWidget(LauncherProvider.java:812)
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): at com.android.launcher2.LauncherProvider$DatabaseHelper.addAppWidget(LauncherProvider.java:790)
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): at com.android.launcher2.LauncherProvider$DatabaseHelper.loadFavorites(LauncherProvider.java:670)
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): at com.android.launcher2.LauncherProvider$DatabaseHelper.onCreate(LauncherProvider.java:239)
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:126)
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): at com.android.launcher2.LauncherProvider.query(LauncherProvider.java:108)
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): at android.content.ContentProvider$Transport.query(ContentProvider.java:187)
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): at android.content.ContentResolver.query(ContentResolver.java:271)
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): at com.android.launcher2.LauncherModel$Loader$LoaderThread.loadWorkspace(LauncherModel.java:711)
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): at com.android.launcher2.LauncherModel$Loader$LoaderThread.loadAndBindWorkspace(LauncherModel.java:521)
09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): at com.android.launcher2.LauncherModel$Loader$LoaderThread.run(LauncherModel.java:588)
我已经android.permission.BIND_APPWIDGET
在清单中添加了,但它仍然无法正常工作,并且我的默认小部件仍然丢失。
有谁知道可能是什么问题?