1

Every new Android project create via Eclipse and ADT plugin in Eclipse show an error

R cannot be resolved to a variable  

in every R call. enter image description here

If I delete all references to the R class, when I try to build and run the app, it shows in the console :

Could not find [YourAndroiProjectName].apk

enter image description here

4

2 回答 2

4

打开:Android SDK 构建工具

在此处输入图像描述

确保您安装了 Android SDK 构建工具。

在此处输入图像描述

于 2013-06-02T22:18:10.127 回答
0

如果您的代码没有错误,请尝试删除 R 文件 eclipse 应该自动重建它。

于 2013-06-02T22:25:19.240 回答