在Ubuntu下把工程目录直接拷贝回来放在eclipse到工程目录里居然报错里前些天公司那么大的项目也都没报错。。。神奇了控制台错误代码Unable to execute dex: wrapper was not properly loaded first
Conversion to Dalvik format failed: Unable to execute dex: wrapper was not properly loaded first查了一下。解决方案:sudo gedit /usr/program/eclipse/eclipse.ini找到Eclipse目录下eclipse.ini文件,将最后两句改为
-Xms128m
-Xmx512m
重启eclipse
然后project->clean一下就OK了第二个问题是使用TabHost遇到de问题Android study week, when two days with TabHost encountered two problems: Question 1. When you run the Activity Your content must have a TabHost whose id attribute is "android.R.id.tabhost" Add a Layout time, xml with element selection TabHost, but the ADT did not add id attribute, running, will be prompted to Your content must have a TabHost whose id attribute is "android.R.id.tabhost" error, need to add the android: id = "@ android: id / tabhost", so on it. Question 2. When you run the Activity Your TabHost must have a TabWidget whose id attribute is "android.R.id.tabcontent" Solution: Modify FrameLayout Add id attribute, ADT xml file automatically generated Id is the android: id = "@ + id/FrameLayout01", need to modify into the following format android: id = "@ android: id / tabcontent", this estimated to be troubled by a large number of beginners, who would have thought would change this place, see the error is easy to modify into tabcontent, but the prefix is not easy to think of. But also in the ADT visual editing this document, the interface shows NullPointerException, this is ADT"s a BUG. Modified xml as follows: <? Xml version = "1.0" encoding = "utf-8"?>
<TabHost
android: id = "@ android: id / tabhost"
xmlns: android = "http://schemas.android.com/apk/res/android"
android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<LinearLayout Android:id="@+id/LinearLayout01" android:layout_height="fill_parent" android:layout_width="fill_parent" android:orientation="vertical"> <TabWidget Android:id="@android:id/tabs" android:layout_height="wrap_content" android:layout_width="fill_parent">
</ TabWidget>
<FrameLayout Android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent">
</ FrameLayout>
</ LinearLayout>
</ TabHost> Note: If TabHost, then the above three marked red must be the same, this is Google"s agreement. And a project can have only one TabHost. TabHost,TabWidget以及FrameLayoutdeandroid:id标签命名一定要按照android的规范 然后就没问题了Debian 6安装小记Linux下时间比正常时间快8小时解决相关资讯 Eclipse Ubuntu
- Eclipse中将Java项目转换成Web项目 (07月28日)
- 用 Python 打造你的 Eclipse (04月26日)
- Eclipse基金会发布下一代IDE, (03月11日)
| - Linux 下搭建stm32开发环境 (07月01日)
- 如何在Eclipse中添加Tomcat的jar包 (03月23日)
- 基于Eclipse搭建STM32开源开发环境 (03月10日)
|
本文评论 查看全部评论 (0)