Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
I was trying to create a simple wearable application with a simple basic WearableListView with its adapter, but WearableListView.Adapter cannot be implemented.
Steps to reproduce.
Create any simple adapter implementing WearableListView.Adapter;
Try to compile your projects.
Got two errors :
myproject\wear\HomeActivity_SimpleAdapter.java(8,8): Error: myproject.wear.HomeActivity_SimpleAdapter is not abstract and does not override abstract method onBindViewHolder(android.support.wearable.view.WearableListView.ViewHolder,int) in android.support.v7.widget.RecyclerView.Adapter
public class HomeActivity_SimpleAdapter
myproject\wear\HomeActivity_SimpleAdapter.java(59,59): Error: onCreateViewHolder(android.view.ViewGroup,int) in myproject.wear.HomeActivity_SimpleAdapter cannot override onCreateViewHolder(android.view.ViewGroup,int) in android.support.v7.widget.RecyclerView.Adapter; attempting to use incompatible return type
found : android.support.v7.widget.RecyclerView.ViewHolder
public android.support.v7.widget.RecyclerView.ViewHolder onCreateViewHolder (android.view.ViewGroup p0, int p1)
Is it possible to get a workaround ou a bug fix ?
Thank you !
I was able to reproduce this bug by following the steps provided. I created a new application then attempted to create an implementation of WearableListView.Adapter. When attempting to override the methods for the WearableListView.Adapter implementation, I ran into the same build errors.
Gist of build error details:
=== Xamarin Studio ===
Version 5.7 (build 329)
Installation UUID: ea2dde6b-0915-4e87-bf59-0163cddeada5
Mono 3.10.0 ((detached/633e444)
GTK+ 2.24.23 (Raleigh theme)
Package version: 310000020
=== Apple Developer Tools ===
Xcode 6.1 (6539)
=== Xamarin.iOS ===
Version: 188.8.131.52 (Business Edition)
Build date: 2014-10-03 00:25:37-0400
=== Xamarin.Android ===
Version: 184.108.40.206 (Business Edition)
Android SDK: /Users/johnpilczak/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
1.6 (API level 4)
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.0 (API level 11)
3.1 (API level 12)
3.2 (API level 13)
4.0 (API level 14)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
4.4.87 (API level 20)
5.0 (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
=== Xamarin.Mac ===
Version: 220.127.116.11 (Starter Edition)
=== Build Information ===
Release ID: 507000329
Git revision: c5e64a09aca2e8dfbdf26e6f77d31cb79636d148
Build date: 2014-10-24 05:38:56-04
=== Operating System ===
Mac OS X 10.9.5
Darwin Vinces-xMac.local 13.4.0 Darwin Kernel Version 13.4.0
Sun Aug 17 19:50:11 PDT 2014
@John: Please attach the project you created.
Link to the project: https://www.dropbox.com/s/5tf8sa51rb4navl/SimpleWear.zip?dl=0
It is basically a fresh project that adds the Xamarin Android Wearable NuGet package and then attempts to implement WearableListView.Adapter using the overrides offered by the intellisense.
It appears that the methods needed to implement a WearableListView are currently using the wrong type of ViewHolder. OnCreateViewHolder and OnBindViewHolder use RecyclerView.ViewHolder as their return type and parameter respectively right now as opposed to WearableListView.ViewHolder which is what is actually compatible with WearableListView causing the build errors.
so any updates on that issue ? Are you planning a bug fix "soon" ? Is there a workaround ?
Any updates ?
I am also running into the same issue. Eagerly awaiting a fix.
I was just informed of a workaround of this issue. If you implement a Android.Support.v7.RecyclerView.Adapter as opposed to a WearableListView.Adapter and then use that adapter the same way you would use the WearableListView.Adapter then it should work just fine on the newest version of the Wear package.
Sorry, I meant to say Android.Support.V7.Widget.RecyclerView.Adapter.
This is now released in 1.1.0.
You can use WearableListView.Adapter but the types that will be used are RecyclerView.ViewHolder (you can .JavaCast<WearableListView.Holder>() if you like, WearableListView.Holder is simply a subclass of RecyclerView.ViewHolder.