我在play store上有一个应用程序,最近我更新了它,它在android设备5.0和5.1上开始崩溃。我已经在模拟器上测试过了,但是我无法在android5.1上复制它。下面给出了轨迹。
java.lang.VerifyError:
at com.example.util.AppSettings.getMinibarArrangement (AppSettings.java:300)
at com.example.activity.HomeActivity.initMinibar (HomeActivity.java:546)
at com.example.activity.HomeActivity.initViews (HomeActivity.java:542)
at com.example.activity.HomeActivity.init (HomeActivity.java:347)
at com.example.activity.HomeActivity.onCreate (HomeActivity.java:323)
at android.app.Activity.performCreate (Activity.java:6550)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1120)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3077)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3233)
at android.app.ActivityThread.access$1000 (ActivityThread.java:197)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1656)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:145)
at android.app.ActivityThread.main (ActivityThread.java:6873)
at java.lang.reflect.Method.invoke (Method.java)
at java.lang.reflect.Method.invoke (Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1199)
appsettings.class类
public ArrayList<LauncherAction.ActionDisplayItem> getMinibarArrangement() {
ArrayList<String> minibarString = getStringList(R.string.pref_key__minibar_items);
ArrayList<LauncherAction.ActionDisplayItem> minibarObject = new ArrayList<>();
for (String action : minibarString) {
LauncherAction.ActionDisplayItem item = LauncherAction.getActionItem(action);
if (item != null) {
minibarObject.add(item);
}
}
if (minibarObject.isEmpty()) {
for (LauncherAction.ActionDisplayItem item : LauncherAction.getActionDisplayItems(getContext())) { //300 Line Number
if (LauncherAction.defaultArrangement.contains(item._action)) {
minibarObject.add(item);
}
}
setMinibarArrangement(minibarString);
}
return minibarObject;
}
launcheraction.class类
public class LauncherAction {
public static class ActionDisplayItem {
public Action _action;
public String _label;
public String _description;
public int _icon;
private ActionDisplayItem(Action action, String label, String description, int icon) {
_action = action;
_label = label;
_description = description;
_icon = icon;
}
}
public static ActionDisplayItem[] actionDisplayItems;
public static ActionDisplayItem[] getActionDisplayItems(Context context) {
if (actionDisplayItems == null) {
actionDisplayItems = new ActionDisplayItem[]{new ActionDisplayItem(Action.EditMinibar, context.getResources().getString(R.string.minibar_title__edit_minibar), context.getResources().getString(R.string.minibar_summary__edit_minibar), R.drawable.ic_edit),
new ActionDisplayItem(Action.SetWallpaper, context.getResources().getString(R.string.minibar_title__set_wallpaper), context.getResources().getString(R.string.minibar_summary__set_wallpaper), R.drawable.ic_image),
// new ActionDisplayItem(Action.LockScreen, context.getResources().getString(R.string.minibar_title__lock_screen), context.getResources().getString(R.string.minibar_summary__lock_screen), R.drawable.ic_lock),
new ActionDisplayItem(Action.LauncherSettings, context.getResources().getString(R.string.minibar_title__launcher_settings), context.getResources().getString(R.string.minibar_summary__launcher_settings), R.drawable.ic_settings),
new ActionDisplayItem(Action.VolumeDialog, context.getResources().getString(R.string.minibar_title__volume_dialog), context.getResources().getString(R.string.minibar_summary__volume_dialog), R.drawable.ic_volume),
new ActionDisplayItem(Action.DeviceSettings, context.getResources().getString(R.string.minibar_title__device_settings), context.getResources().getString(R.string.minibar_summary__device_settings), R.drawable.ic_android),
new ActionDisplayItem(Action.AppDrawer, context.getResources().getString(R.string.minibar_title__app_drawer), context.getResources().getString(R.string.minibar_summary__app_drawer), R.drawable.ic_apps),
new ActionDisplayItem(Action.SearchBar, context.getResources().getString(R.string.minibar_title__search_bar), context.getResources().getString(R.string.minibar_summary__search_bar), R.drawable.ic_search),
new ActionDisplayItem(Action.MobileNetworkSettings, context.getResources().getString(R.string.minibar_title__mobile_network), context.getResources().getString(R.string.minibar_summary__mobile_network), R.drawable.ic_network),
new ActionDisplayItem(Action.ShowNotifications, context.getResources().getString(R.string.minibar_title__notification_bar), context.getResources().getString(R.string.minibar_summary__notification_bar), R.drawable.ic_notifications),
new ActionDisplayItem(Action.Camera, context.getResources().getString(R.string.minibar_title__camera), context.getResources().getString(R.string.minibar_summary__camera), R.drawable.ic_camera),
new ActionDisplayItem(Action.Location, context.getResources().getString(R.string.minibar_title__location), context.getResources().getString(R.string.minibar_summary__location), R.drawable.ic_location),
new ActionDisplayItem(Action.Hotspot, context.getResources().getString(R.string.minibar_title__hotspot), context.getResources().getString(R.string.minibar_summary__hotspot), R.drawable.ic_hotspot),
new ActionDisplayItem(Action.Airplane, context.getResources().getString(R.string.minibar_title__airplane), context.getResources().getString(R.string.minibar_summary__airplane), R.drawable.ic_airplane),
new ActionDisplayItem(Action.MobileData, context.getResources().getString(R.string.minibar_title__mobile_data), context.getResources().getString(R.string.minibar_summary__mobile_data), R.drawable.ic_mobile_data)
};
}
return actionDisplayItems;
}
}
我不知道如何解决java.lang.verifyerror。任何帮助解决这个问题将不胜感激。
暂无答案!
目前还没有任何答案,快来回答吧!