Eclipse中开发Android应用出现的error及solution汇总
16lz
2021-01-25
1.
Error:
project cannot be built until build path errors are resolved
Cause:
没有在工程里引入android开发包
Solution:
右击选择build path ,Add library
2.
Error:
r.layout.main cannnot be resolved
Cause:
默认新建project中 import android.R;
Solution:
注解掉 (//import android.R;)
Context:
Having the import android.R seems to refer to the default R.java provided by the android platform instead of the version for your application…. hence the main.xml being referred to is not found. Removing the import statement fixes the problem by causing the application to search for R.java locally.
3.
Error:
R cannot be resolved
Solution:
关掉build automatically,重新clean(貌似还有其他东西,忘掉了) O_O
4.
Error:
在res/draw文件夹里添加了mp3文件,在R文件里没有自动添加
Solution:
没有自动build,勾选即可
5.
Error:
adb 不是内如或者外部命令,也不是可运行的程序或批处理文件。
Solution:
启动模拟器,
cd到tools文件夹目录,
然后在d:
就可以使用了。
更多相关文章
- 一款常用的 Squid 日志分析工具
- GitHub 标星 8K+!一款开源替代 ls 的工具你值得拥有!
- RHEL 6 下 DHCP+TFTP+FTP+PXE+Kickstart 实现无人值守安装
- Linux 环境下实战 Rsync 备份工具及配置 rsync+inotify 实时同步
- Android(安卓)webview 一些奇怪的问题
- [转]Windows下用Git下载android源码
- android 自定义核心服务
- Qt on Android(安卓)Episode 3
- 使用原始的HTTP拼凑请求的方式上传多张图片