android开发出现R cannot be resolved to a variable 问题解决办法之一
来源:互联网 发布:淘宝网怎么盈利 编辑:程序博客网 时间:2024/06/08 07:25
第一次弄这个,不知道是没掌握eclipse用法还是没弄清android sdk内在关联,居然新建一个项目都会报错,这是以前用微软的工具没有的,而且要弄的步骤特别多,android sdk,还有个ADT,都是版本一大堆,好不容易更新完,也不知道哪个有用哪个没用。
废话少说,话说,新建一个项目,就提示出现了错误,“R cannot be resolved to a variable”,百度,GOOGLE了N多办法,无非就是CLEAN或者是FIX project等,但都没有用,后来查到R.java需要在生成项目时创建,需要BUILD TOOL发挥作用,搜到这个工具是aapt.exe,在sdk里找到aapt.exe有好几个版本,发现18.1.0,18.0.1文件夹里的都没法执行,说不是合法的windows程序,只是有17.0文件夹里可以正常运行,删除掉18版本的aapt.exe,而后用sdk manage重新更新还是无法运行,搞不懂了,查了17.0的aapt.exe属性也没有版本信息,试着用17.0文件下aapt.exe替换18.1.0,18.0.1文件下的该文件,再打开eclipse,打开先前建的项目,发现错误没了,gen下的R.java也出现了,真是高兴!
- android开发出现R cannot be resolved to a variable 问题解决办法之一
- Android出现“R cannot be resolved to a variable"
- R cannot be resolved to a variable 处理办法
- R cannot be resolved to a variable
- r cannot be resolved to a variable
- R cannot be resolved to a variable
- R cannot be resolved to a variable
- R cannot be resolved to a variable
- R cannot be resolved to a variable
- R cannot be resolved to a variable
- R cannot be resolved to a variable
- R cannot be resolved to a variable
- R cannot be resolved to a variable
- R cannot be resolved to a variable
- R cannot be resolved to a variable
- R cannot be resolved to a variable
- R cannot be resolved to a variable
- R cannot be resolved to a variable
- POJ 1144 && UVA 315 ——无向连通图求割顶
- UNIX网络编程初步
- JS冒泡事件解决方案
- 电子研发联盟-多功能数字调频收音机
- Sprite Kit 动作系统
- android开发出现R cannot be resolved to a variable 问题解决办法之一
- TTL电平,CMOS电平
- jstl 获取Parameter参数 , switch使用
- 在C#中利用SQL语句与数据库进行操作
- VS2010 编译安装Boost库
- 备忘录模式(Memento)
- 使用批处理脚本(BAT)调用FFMPEG批量编码视频
- 使用新浪微博分享图片文字(实战)
- SVN服务器搭建和使用(四)Svn 设置 修改 日志