今天太郁闷了,,搞Android环境把我快弄疯了,,,情况是这样的:刚到公司,,,老大给个Url让看svn上的代码,,然后我就在eclipse上装个svn控件,,这还挺顺利,,然后就是import代码到eclipse上了,,,下下来的代码R文件总是有错,,,有的xml文件也打开有问题,,,公司让装的adt-11,,,,我装的也挺顺利,,但是在eclipse上没有图标唉,,今天过的真郁闷,,代码没有看,,,压力大啊靠,,,该死的环境,,,,
问题:1.R文件报错该怎么解决,,,我试过clean refesh ,重启eclipse都不行
2.adt-11装完后为什么在eclipse上没有图标,,,
3.有些xml文件的预览视图有问题,,,
谁给指点指点啊,,多谢,,,,
问题:1.R文件报错该怎么解决,,,我试过clean refesh ,重启eclipse都不行
2.adt-11装完后为什么在eclipse上没有图标,,,
3.有些xml文件的预览视图有问题,,,
谁给指点指点啊,,多谢,,,,
svn的代码并不会完整的,R文件生成不了主要是因为资源文件不存在,解决办法,如果只是资源文件不存在,例如图片的话,你可以根据出错的地方找到图片文件名标识,随意找一些图片,改名成相应的文件名然后复制到资源文件目录里面。大部分svn下来的代码都是缺斤少两的。
把SDK版本降到4或者提升一点
<!-- 加载进度圈 布局 -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:gravity="center">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center">
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminateDrawable="@drawable/progressbar_drawable"
android:layout_marginRight="10dip"/>
<!-- android:text="@string/dialog_tip" -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textSize="18sp"
android:textColor="@color/white"/>
</LinearLayout>
</LinearLayout>
如果drawable目录下存在progressbar_drawable文件的话就没问题
2、
3、我也遇到过。
删除Android SDK Location 路径下的temps文件夹(我的安装在c://programs file/android),这是SDK升级过程中并没把遗留下来的文件删掉,temps下的文件对你无用,放心的删。
删完后,我重启一下eclipse,再点击xm文件l打开就能够看到设计图形
public final class R {
public static final class array {
/** 鐐瑰嚮鍚敤鍚敤澶氶�鍚�
*/
public static final int file_operations=0x7f040007;
/** 鐐瑰嚮鍚敤鍏ㄩ�鍚�
*/
public static final int file_operations_cansleall=0x7f040008;
/** 娌℃湁鐐瑰嚮鍚姩澶氶�
*/
public static final int file_operations_nomulsel=0x7f040009;
public static final int file_searchrange=0x7f040006;
/** 鍚敤澶氶�涓斿叏閫夌姸鎬佷笅鐨勬枃浠舵搷浣滈�椤� 鏈湴绌洪棿鍜屽鎺ュ瓨鍌�
*/
public static final int moreoptionsallselectstauts_file_operations=0x7f040001;
/** 鍚敤澶氶�鐘舵�涓嬬殑鏂囦欢鎿嶄綔閫夐」 鍏ㄩ� 鎼滅储
*/
public static final int moreoptionsallselectstauts_filesearchResult_operations=0x7f040003;
/** 鍚敤澶氶�鐘舵�涓嬬殑鏂囦欢鎿嶄綔閫夐」 鏈湴绌洪棿鍜屽鎺ュ瓨鍌�
*/
public static final int moreoptionsstauts_file_operations=0x7f040000;
/** 鍚敤澶氶�鐘舵�涓嬬殑鏂囦欢鎿嶄綔閫夐」 鏈叏閫�鎼滅储
*/
public static final int moreoptionsstauts_filesearchResult_operations=0x7f040002;
/** 鏈惎鐢ㄥ閫夌姸鎬佷笅鐨勬枃浠舵搷浣滈�椤� 鏈湴绌洪棿鍜屽鎺ュ瓨鍌�
*/
public static final int normalstauts_file_operations=0x7f040005;
/** 鏈惎鐢ㄥ閫夌姸鎬佷笅鐨勬枃浠舵搷浣滈�椤� 鎼滅储
*/
public static final int normalstauts_filesearchResult_operations=0x7f040004;
}
public static final class attr {
}
public static final class color {
public static final int black=0x7f050001;
public static final int bubble_dark_background=0x7f050000;
public static final int dark=0x7f05000a;
public static final int device_info_color=0x7f050009;
public static final int devicespace_color=0x7f05000d;
/** 鏂囦欢澶逛腑鎻愮ず鏂囧瓧鐨勯鑹�
工程用的是gbk编码,,,其他的.java文件中文就没有问题,,,如果把这个R文件编码改成utf-8中文能正确显示,但是R文件上的小黑星星依然存在,,,