我的应用程序使用标签布局并且之前编译并运行正常。但它现在提出了一个异常。我重新创建模拟器并且没有使用rusalt。 Eclipse控制台中显示的错误如下所示。
[2013-11-20 11:42:52 - Dex Loader] Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.
[2013-11-20 11:42:52 - AndroidTabLayout] Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.
我的代码包含一个简单的标签应用程序。
TabHost tabHost = getTabHost();
// Tab for Travaling
TabSpec Travaling = tabHost.newTabSpec("Travaling");
Travaling.setIndicator("Travaling", getResources().getDrawable(R.drawable.icon_travaling_tab));
Intent TravalingIntent = new Intent(this, TravalingActivity.class);
Travaling.setContent(TravalingIntent);
// Tab for Maps
TabSpec Maps = tabHost.newTabSpec("Maps");
// setting Title and Icon for the Tab
Maps.setIndicator("Maps", getResources().getDrawable(R.drawable.icon_maps_tab));
Intent MapsIntent = new Intent(this, MapsActivity.class);
Maps.setContent(MapsIntent);
// Tab for Scheduling
TabSpec Scheduling = tabHost.newTabSpec("Scheduling");
Scheduling.setIndicator("Scheduling", getResources().getDrawable(R.drawable.icon_schedulingIntent_tab));
Intent SchedulingIntent = new Intent(this, SchedulingActivity.class);
Scheduling.setContent(SchedulingIntent);
// Adding all TabSpec to TabHost
tabHost.addTab(Travaling);
tabHost.addTab(Maps);
tabHost.addTab(Scheduling);
}
}
这是 Android支持库 ???
的问题我用Google搜索答案,但没有可行的解决方案 。我很感激你在这件事上的帮助。 谢谢!!!!!