简体   繁体   English

在Eclipse中创建android项目后出现错误

[英]Error after creating an android project in Eclipse

Each time I create a project and add, for example, a TextView, Eclipse gives me the error: 每次我创建一个项目并添加例如TextView时,Eclipse都会给我以下错误:

Type Error executing aapt: Return code -1073741816 test3 line 1 Android ADT Problem. 键入执行aapt时出错:返回代码-1073741816 test3第1行Android ADT问题。

Tried to solve the problem by: deleting the SDK bundle and then downloading it again; 试图通过以下方法解决该问题:删除SDK捆绑包,然后再次下载; cleaned C drive (as it also used to give an error that res.bin could not be created or something like that); 清理过的C驱动器(因为它还曾经导致无法创建res.bin或类似错误); Plus says 'R cannot be resolved to a variable' when I open the MainActivity.java file. 加号说,当我打开MainActivity.java文件时,“ R无法解析为变量”。

Any help will be much appretiated 任何帮助将不胜感激

I would suggest you to move your project(eclipse.exe and re install sdk) folder along with Eclipse and sdk to a new directory and since the old one will always reference back to the paths that might contain errors. 我建议您将您的project(eclipse.exe并重新安装sdk)文件夹以及Eclipse和sdk移至新目录,因为旧目录将始终引用回到可能包含错误的路径。 Once the new directory is up with no errors u can direct the eclipse to your older workspace. 一旦建立了新目录且没有错误,您就可以将Eclipse引导到您的旧工作空间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM