我得到了这个例外
01-03 00:28:43.465 E/AndroidRuntime(13556): java.lang.NoSuchMethodError: android.content.pm.PackageManager.currentToCanonicalPackageNames
01-03 00:28:43.465 E/AndroidRuntime(13556): at com.android.DL_launcher.LauncherProvider$DatabaseHelper.addAppShortcut(LauncherProvider.java:632)
01-03 00:28:43.465 E/AndroidRuntime(13556): at com.android.DL_launcher.LauncherProvider$DatabaseHelper.loadFavorites(LauncherProvider.java:596)
01-03 00:28:43.465 E/AndroidRuntime(13556): at com.android.DL_launcher.LauncherProvider$DatabaseHelper.onCreate(LauncherProvider.java:253)
01-03 00:28:43.465 E/AndroidRuntime(13556): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:106)
01-03 00:28:43.465 E/AndroidRuntime(13556): at com.android.DL_launcher.LauncherProvider.query(LauncherProvider.java:111)
01-03 00:28:43.465 E/AndroidRuntime(13556): at android.content.ContentProvider$Transport.query(ContentProvider.java:130)
01-03 00:28:43.465 E/AndroidRuntime(13556): at android.content.ContentResolver.query(ContentResolver.java:202)
01-03 00:28:43.465 E/AndroidRuntime(13556): at com.android.DL_launcher.LauncherModel$DesktopItemsLoader.updateShortcutLabels(LauncherModel.java:1134)
01-03 00:28:43.465 E/AndroidRuntime(13556): at com.android.DL_launcher.LauncherModel$DesktopItemsLoader.load_workspace(LauncherModel.java:877)
01-03 00:28:43.465 E/AndroidRuntime(13556): at com.android.DL_launcher.LauncherModel$DesktopItemsLoader.run(LauncherModel.java:864)
01-03 00:28:43.465 E/AndroidRuntime(13556): at java.lang.Thread.run(Thread.java:1096)
使用此方法时
android.content.pm.PackageManager.currentToCanonicalPackageNames(String[])
根据开发文档
问题发生在设备 Moto Milestone 上,Android 版本为 2.1-update1。
这是因为Moto修改了ROM吗?
任何建议表示赞赏。