Android项目The type R is already defined
来源:互联网 发布:千牛首页的店铺数据 编辑:程序博客网 时间:2024/05/16 05:07
Android项目The type R is already defined
现象:
使用Android Studio打开且编译过的项目,再次在Ubuntu源码编译服务器中编译时,报错如下:
ERROR: /home/user/androidSource/out/target/common/obj/APPS/xxxx_intermediates/src/com/xx/xxx/R.java:10:
The type R is already defined
ERROR: /home/user/xxxx/vendor/customer/xxx/xxxx/gen/com/xx/xxx/IMyAidlInterface.java:8:
The type IMyAidlInterface is already defined
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target ‘ninja_wrapper’ failed
make: * [ninja_wrapper] Error 1
make: Leaving directory ‘/home/user/androidSource’
原因:
Android Studio编译后生成的build路径下,R文件、aidl文件与编译服务器中的R文件、aidl文件重复
解决方案:
将Android Studio生成的 build/generated/source/aidl/debug/com.xx.xxx/IMyAidlInterface.java 和 build/generated/source/r/debug/com.xx.xxx/R.java 都删除,然后重新再在Ubuntu源码编译服务器中编译代码
- Android项目The type R is already defined
- Android The Type R is already defined
- The type R is already defined
- The type R is already defined!問題。
- The type R is already defined
- 编译器&调试---Android项目遇到"TheType R is already defined"
- Android项目遇到"TheType R is already defined"
- 编译器&调试---Android项目遇到"TheType R is already defined"
- Android项目遇到"TheType R is already defined"
- The type 类名 is already defined
- The type 类名 is already defined
- The type 类名 is already defined
- The type 类名 is already defined
- The type 类名 is already defined
- The type 类名 is already defined
- MyEclipse 10编程总是提示The type Cat is already defined错误
- 【已解决】Eclipse莫名出现The type MyThread is already defined错误
- Resource entry is already defined
- spring Boot 生成图片验证码 存入redis
- 在activity类中更新widget
- 聊一聊PCB规划、布局和布线方面的设计技巧
- Android 线程通信(Handler + Message + Looper) 2
- String、StringBuffer、StringBuilder的区别
- Android项目The type R is already defined
- Seafile与花生壳实现网络网盘-yellowcong
- FPGA之有限状态机
- HandlerThread 源码解析
- 高级命令行文本处理cut,sed,awk
- Parted分区
- JS插件(1)--- autocomplete 异步加载下拉数据
- Codeforces Round #442(Div.2) B.Nikita and string(线性DP)
- 深度学习与神经网络-吴恩达(Part2Week3)-超参数调试、Batch正则化和程序框架