22

At the time of exectution am getting an error

Cannot reload AVD list: cvc-enumeration-valid: Value '280dpi' is not facet-valid with respect to enumeration '[ldpi, mdpi, tvdpi, hdpi, xhdpi, 400dpi, xxhdpi, 560dpi, xxxhdpi]'. It must be a value from the enumeration. Error parsing C:\Users\Binil\AppData\Local\Android\sdk\system-images\android-22\android-wear\armeabi-v7a\devices.xml cvc-enumeration-valid: Value '280dpi' is not facet-valid with respect to enumeration '[ldpi, mdpi, tvdpi, hdpi, xhdpi, 400dpi, xxhdpi, 560dpi, xxxhdpi]'. It must be a value from the enumeration.

am using android studio .

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.1'

}

can any one please tell me how to rectify this error.

  • 1
    check this link http://stackoverflow.com/questions/33253381/using-android-support-v4-library-in-intellij-idea – Priya Nov 13 '15 at 06:20

7 Answers7

56

This problem is caused because the Android Studio is not able to load android wear system images with given dpi. To resolve this, do this:

1) Go to:

C:\Program Files (x86)\Android\android-sdk\system-images\android-23

and delete the "android wear" folder which contains system images of android wear.

nkt24
  • 981
  • 7
  • 9
19

Go to Android SDK and delete all Android Wear packages.

wannik
  • 12,212
  • 11
  • 46
  • 58
7

The problem I have with all of these answers is they throw out the baby with the bathwater. Just read the problem and you'll realize the devices config file has a value that's not allowed.

  1. Check which resolutions are not facet-valid according to the error. In the case of the OP's problem it's 280dpi. In mine, it was 360dpi
  2. Find the closest value in the enumeration. Refer to Scale factor for xxhdpi android. In the OP case, 280dpi ~ hdpi. In my case, 360dpi ~xhdpi.
  3. Open the files described in the error. (devices.xml in x86 and armeabi-v7a in ...Android\sdk\system-images\android-23\android-wear\ in my case)
  4. Edit any instances of invalid values found in step 1 to valid values found in step 2. <d:pixel-density>280dpi</d:pixel-density> becomes <d:pixel-density>hdpi</d:pixel-density>

Edit: The problem with the answers that blindly delete the entire folder is that now you can't develop for Android Wear. The problem with replacing devices.xml folder is you're providing a list of phone specs where wearable specs are expected. Now you can't test.

Community
  • 1
  • 1
vee_ess
  • 699
  • 5
  • 14
  • 1
    This is the correct solution for **fixing** the problem. – nick.graziano Aug 30 '16 at 16:26
  • 1
    Exactly. I refused to stick my head in the sand and go with one of these others. It's too bad this isn't marked as the solution as others will continue to first try the ones on top and potentially cause latent issues. – vee_ess Jan 22 '17 at 19:43
2

go to the directory and delete the devices.xml

then go to tool>android>enable ADB intergration

  • this error is still popping up after trying that suggestion – Erik Dec 01 '15 at 18:53
  • For me, renaming the "devices.xml" to "_devices.xml" did the trick(just in case i need them), i had a few "devices.xml" files which were shown in the error log. I am using eclipse neon, i guess the step with "ADB integration" is for IntelliJ IDE – kaya Oct 05 '16 at 00:43
2

No need to root it. For me, removing the android wear folder from the path did the trick! C:\Users\Binil\AppData\Local\Android\sdk\system-images\android-22\android-wear

Just delete this android wear folder and it will do the trick, hopefully :)

Sonal
  • 579
  • 5
  • 7
0

To be honest I don't understand why Google moved from eclipse to Intelli Idea, I have a lot of issues that I did not had before.

RaistlinMolina
  • 345
  • 1
  • 9
0

In my case(Linux), I just delete the file

/root/xxx/Sdk/system-images/android-23/android-tv/armeabi-v7a/devices.xml

then I copy

/root/xxx/Sdk/tools/lib/devices.xml

to

/root/xxx/Sdk/system-images/android-23/android-tv/armeabi-v7a/
Tunaki
  • 132,869
  • 46
  • 340
  • 423
zqer
  • 115
  • 10