我的 wear 应用程序使用 WearableListView.Item 作为 ListView,它运行良好并已编译 - 但后来我升级了 Android Studio、Gradle 插件、SDK 工具等,现在它无法编译。
我的 wear build.gradle 包含:
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.+'
}
现在它说:Error:(141, 84) error: cannot find symbol class Item
有什么帮助吗?
最佳答案
那是因为 API 发生了变化。它现在依赖于 RecyclerView
Here is a gist显示如何实现 WearableListView
。
关于android - 可穿戴设备支持库 1.1 中缺少 WearableListView.Item,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27443221/