0

I create a new android application minimum-target-compiler version is set to api level 10, deployed successful. But when i added support library to the project R.java disappeared in gen folder. Error is, R can not be resolved to a variable, please see the screenshot. There is no error in xml. I am getting error in console. I cleaned and build but did not work.

Shashi Shiva L
  • 495
  • 11
  • 27

2 Answers2

0

Set build target of your project was Android 2.1 (API 7). You have to target Android 4.0 (API 14) at least to get rid of the warning message.

Your app will still run on Android 2.1 devices.

Kanwaljit Singh
  • 4,339
  • 2
  • 18
  • 21
0

As said by @Kanwaljit Singh., Basically values-v14 used for version 14 and above. Finally I found solution.

android:minSdkVersion="8"
android:maxSdkVersion="19"
android:targetSdkVersion="16"

And Project Build target to api-14. Finally clean and build the project. This solved in my case.

Kanwaljit Singh
  • 4,339
  • 2
  • 18
  • 21
Shashi Shiva L
  • 495
  • 11
  • 27