android开发遇到的问题
2015-07-30 12:04
513 查看
一、error
opening trace file: No such file or directory (2)
问题原因:字面翻译是“没有这类文件或者是目录“,文件本身存在。其实系统是找不到文件或者是目录!写了很多class文件后,在AndroidMainfest.xml中声明,后来又修改或者加了新的class,然后把之前的class删掉了,但是AndroidMainfest.xml中的声明却没有修改或删除。解决办法:把AndroidMainfest.xml中的声明修改或删除已改的配置就好了;
二、No Launcher
activity found!
问题原因:找不到启动项解决办法:AndroidManifest.xml主配置文件里面没有配置启动项(原因多种多样),在<application></application>添加
<activity android:name="com.example.t.MainActivity" android:label="@string/hello_activity_text_text">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
片段,其中.MainActivity就是你的项目的主Activity
三、This text field does not specify an inputType or a hint
问题原因:没有给EditText编辑设置inputtype属性(输入框的类型)
解决办法:在EditText标签里加上android:inputType="none"
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:inputType="none"/>
四、Buttons in button bars should
be borderless
问题原因:两个
Buttons 放在一个布局里会被判断为按钮栏,需要添加样式取消它的边框
解决办法:在
Buttons 上添加属性 style="?android:attr/buttonBarButtonStyle"
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn1_name"
style="?android:attr/buttonBarButtonStyle"/>
五、the
project was not built due to "a resource exists with a different case'项目位置',",fix the problem,then try refreshing this project and building it since it may be inconsistent
问题原因:資源存在不同的大小写
解决办法:发现自己的项目中有两个包:Hygl...和HyGl....
将HyGl这个包改了其他一个名字后,重新加载项目解决!
来源:http://blog.sina.com.cn/s/blog_6c1da70601011stf.html;
相关文章推荐
- Android反射drawable
- Android图片处理
- 使用Java代码来比较Android客户端版本号
- android的MainActivity中setOnClickListener(this)中的this指代
- 【Android测试】【第六节】Monkey——认识和使用
- android sdk下载地址
- openfire+android消息推送
- Android如何屏蔽媒体扫描
- 打开android项目报错 Gradle DSL method not found: 'android()'和Gradle DSL method not found: 'runProguard‘
- android自定义view之---组合view
- android自定义view之---组合view
- Android之二维码的生成与解析
- Android 五种布局
- android布局中显示隐藏动画
- 如何在Android中为TextView动态设置drawableLeft等
- Android 快捷键
- Android 按钮点击两次触发不同的事件
- android ListView详解
- Android开发环境的搭建
- openfire学习 android客户端