1

When i create a new android application project in eclipse the gen - file is empty. I found out I have to install android sdk build-tools but in the tools folder there's just the Android SDK tools and the android platform tools. It's revision 22

user2565603
  • 31
  • 1
  • 1
  • 4
  • http://stackoverflow.com/questions/16642604/eclipse-error-r-cannot-be-resolved-to-a-variable/16643060#16643060. check this if it helps – Raghunandan Jul 09 '13 at 17:53

5 Answers5

5

You need to start the SDK Manager and download the build-tools from there.

enter image description here

TronicZomB
  • 8,299
  • 7
  • 32
  • 47
1

You'll need to update the ADT (Android Development Tools) in Eclipse to the newest version first (see this post for more info on how to do this). What also worked for me was to get the Android API and all the extras updated before I could update the build-tools.

Community
  • 1
  • 1
Aleksander Lidtke
  • 2,368
  • 3
  • 25
  • 41
0

May be you can use ADT bundle (http://developer.android.com/sdk/index.html) and avoid the manual installing of SDK and eclipse plugins. All you need to do is to download it, unzip it and start using eclipse to create your apps.

pree
  • 2,057
  • 6
  • 32
  • 50
0

I had the same concern.

You may be looking in the wrong sdk folder.

I had two on my machine. One from before I started using the ADT Bundle. when you open Eclipse sometimes it opens the SDK manager for the wrong SDK. Open it manually from the bundle you downloaded.

Hope this helps.

0

I hope that this will help you and others. I had downloaded the "build tools" myself and placed in "Android home". I even used some of the tools several times but could not link them to other tools listed under sdkmanager. After much searching, I found that;

  1. deleting the old tools that I installed manually, and
  2. re-installing the same package version of the tools using the sdkmanager

helped me. After this the tools showed up under the list of packages in the sdkmanager. I had not noticed that my "build tools" were not listed on sdkmanager before as I had installed them myself and barely used the manager.

If you don't want to go through this (reinstall) hassle, I noticed that the only difference between the auto install and manual is that sdkmanager kept the package version directory structure for the "build tools". For example, if you download version 4.0.5, then it will be in

<ANDROID-HOME>/build-tools/4.0.5/ 

whereas I had done away with this to keep the file path shorter. After this, all should be fine.

Note: this is like learning that white space matters in some languages and not others. You just have to follow the thing's rules. Also question is a duplicate of this one.

Phume
  • 21
  • 6