0

Good morning.

I am creating a "Android Application Project" and I get an error "R can not be resolved to a variable". The error I get nothing and create the blueprint (the "Hello World") without adding any thing more (the basic example).

Thank you.

PS: Platform SDK: API 17; Android SDK Tools: 22.0.1, Build-Android SDK Tools: 17.

3

2 Answers 2

3

As stated here:

After updating to SDK Tools to rev. 22 for the first time, you may need to relaunch Android SDK Manager again and install a new item: Android SDK Build-tools. enter image description here

After installing this, clean your projects and rebuild.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! Uninstalled this due to an upgrade, and got this error. NO indication what the IDE is failing at.
2

'R' isn't generated if there are any errors in your XML files. So check all your XML files. Check for errors in naming the XML files. No capital letters etc.

If you're using Eclipse, it helps if you delete your gen folder and add it using Project > Properties > Java Build Path > Source tab > Add Source > Select gen and then Clean and Build your project

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.