I was trying to bring a ‘Tile’ for Android Wear OS in my Android Native Project. To create a tile in Android, I was going through this Code Labs project — https://developer.android.com/codelabs/wear-tiles#0
I have added the “HelloWorldTileService” code from this project in my Native project, but I am facing an error — Class ‘MyTileService’ is not abstract and does not implement abstract base class member public abstract val lifecycle: Lifecycle defined in com.google.android.horologist.tiles.CoroutinesTileService
Steps to replicate the issue:
- Create a native C++ project.
- Add a class and add the code of HelloWorldTileService from the above repo. Now if you try to build it would give the same error. (Note: Add the dependencies in the gradle files from the same repo)
Does anyone know how we can resolve this issue?
There is also same issue posted in its github repo — https://github.com/android/codelab-wear-tiles/issues/11. But none of the suggestions mentioned there worked for me.