简体   繁体   English

appcompat_v7和每个Eclipse项目中的错误

[英]Error in appcompat_v7 and every eclipse project

I just started android programming and downloaded the latest versions of ADT and android SDK. 我刚刚开始进行android编程,并下载了ADT和android SDK的最新版本。 However, any new project I try to create is having 4 errors. 但是,我尝试创建的任何新项目都有4个错误。

One of the errors is " Error executing aapt. Please check aapt is present at /home/nikhil/Android/adt-bundle-linux-x86_64-20140702/sdk/build-tools/android-4.4W/aapt " . 错误之一是“执行aapt时出错。请检查/home/nikhil/Android/adt-bundle-linux-x86_64-20140702/sdk/build-tools/android-4.4W/aapt中是否存在aapt”。 The type of the error is Android Packaging Problem and the problem occurs in appcompat_v7. 错误的类型为Android包装问题,该问题发生在appcompat_v7中。 The aapt file is exactly at the specified place but somehow eclipse cant execute it. aapt文件恰好在指定的位置,但是以某种方式eclipse无法执行它。

The other 3 errors are "R cannot be resolved to a variable" and it occurs in MainActivity.java. 其他3个错误是“ R无法解析为变量”,它发生在MainActivity.java中。

I am running Arch Linux 64 bit and using Eclipse IDE for Android Developers 23.0.2.1259578. 我正在运行64位Arch Linux,并为Android开发人员23.0.2.1259578使用Eclipse IDE。

I am trying to create My First App and is puzzled to see errors before i wrote a single line of code! 我正在尝试创建“我的第一个应用程序”,并且在写一行代码之前迷惑地看到错误!

This happends occasionaly and the usual way I fix this is to go into Projects -> Properties -> Android -> then choose appcompat from the list, apply, then go. 偶尔会发生这种情况,而我解决此问题的通常方法是进入项目->属性-> Android->然后从列表中选择appcompat,然后应用,然后继续。 The R cannot be resolved to a variable is usually because there is an error in one of your XML files which you have to resolve. R无法解析为变量通常是因为您必须解析的XML文件之一存在错误。

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

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