摘要: 问题描述Source not foundThe JAR file D:\.....\sdk\platforms\android-20\android.jar has no source attachment.问题原因及解决办法1. 使用SDK Manager下载最新版本的Sources for An... 阅读全文
posted @ 2014-07-28 14:56 当年 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 对于LinearLayout何时生效的问题对于 LinearLayout当 android:orientation="horizontal" 时, 只有水平方向的设置才起作用,垂直方向的设置不起作用。即:left,right,center_horizontal 是生效的。当 android:orie... 阅读全文
posted @ 2014-07-28 14:39 当年 阅读(257) 评论(0) 推荐(0) 编辑
摘要: REF:http://blog.csdn.net/dianfusoft/article/details/7422540 可以看出这个工程由src,gen,Android2.3.3 jar包,assets,bin,res,AndroidManifest.xml,proguard.cfg,proje... 阅读全文
posted @ 2014-07-24 11:25 当年 阅读(220) 评论(0) 推荐(0) 编辑
摘要: REF:http://blog.csdn.net/gulianchao/article/details/23391651(一) Layout命名 1.contentview命名:activity_功能模块.xml例如:activity_main.xml、activity_more.xml2.Dial... 阅读全文
posted @ 2014-07-24 10:25 当年 阅读(943) 评论(0) 推荐(1) 编辑
摘要: The processing instruction target matching "[xX][mM][lL]" is not allowed.问题描述原因及解决方法XML第一行没有写而直接写了第二行,XML前面空行或者有空格都会导致匹配错误。[I18N] Hardcoded string "3"... 阅读全文
posted @ 2014-07-23 08:29 当年 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 刚运行过得程序,没改代码,过了一会儿再运行出现错误。error opening trace file: No such file or directory (2)即找不到文件或路径,后来发现Manifest中注册Activity的代码不见了。暂未找到原因。7.25又报这个错误,项目API和设备API... 阅读全文
posted @ 2014-07-22 14:50 当年 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 在主Activity的OnCreate()方法中,通过findViewById得到Activiity_main中已定义的组件,例如Button、EditText等,注意需要强制转型view到具体的类型。给取得的组件btn添加监听器如OnClickListener(),在其中实例化Intent对象,参... 阅读全文
posted @ 2014-07-22 11:34 当年 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 1、LinearLayout是子view均为单方向的,即均为水平或垂直方向的布局。你可以用android:orientation属性来定义layout方向所有子view都是一个挨着一个的,所以一个垂直列表,不管它本身多宽,同时只能有一行。若是水平列表,则都等高。2、LayoutWeight用来操控各... 阅读全文
posted @ 2014-07-22 08:34 当年 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 问题描述error: Error parsing XML: not well-formed (invalid token)问题原因及解决此错误出现于标签不匹配,但我从头到脚检查了发现都没有问题的。 最后知道有时候是Eclipse本身的问题 解决方法: Project----》clean 阅读全文
posted @ 2014-07-21 03:40 当年 阅读(207) 评论(0) 推荐(0) 编辑
摘要: fill_parent、wrap_content、match_parent 用法实例测试fill_parent设置一个顶部布局或控件强制性让它布满整个屏幕。wrap_content布局指根据视图内部内容自动扩展以适应其大小,(刚好能支撑起其内容的大小)Android2.2后fill_parent由m... 阅读全文
posted @ 2014-07-21 03:20 当年 阅读(431) 评论(0) 推荐(0) 编辑