Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WearableListView.Item missing from wearable support library 1.1

My wear app uses WearableListView.Item for a ListView, and it worked fine and compiled - but then I upgraded Android Studio, Gradle plugin, SDK tools etc etc, and now it won't compile.

My wear build.gradle contains:

compileSdkVersion 20
buildToolsVersion "21.1.2"
...
    minSdkVersion 20
    targetSdkVersion 20
...

dependencies {
   compile fileTree(dir: 'libs', include: ['*.jar'])
   compile 'com.google.android.support:wearable:+'
   compile 'com.google.android.gms:play-services-wearable:6.5.+'
}

Now it says: Error:(141, 84) error: cannot find symbol class Item

Any help out there please?

like image 733
barkside Avatar asked Dec 12 '14 12:12

barkside


1 Answers

That's because the API has changed. It now depend on RecyclerView

Here is a gist showing how to implement a WearableListView.

like image 176
Nicolas POMEPUY Avatar answered Nov 22 '22 20:11

Nicolas POMEPUY