我制作了自己的表盘,现在我想在表盘上添加手机电池百分比,同时可以通过手机自定义表盘。我尝试使用此功能:Android Wear Watchface Settings on host但我一直在收到错误。
Unknown entity 'connection callbacks'
Method
com.google.android.gems.common.Api.GoggleApiClient.builder.addConnectioncallbacks(com.google.android.gems.common.Api.GoggleApiClient.builder.Connectioncallbacks)'in
com.google.android.gems.common.Api.GoggleApiClient.Builder' connot be applied to '(com.example.android.wearable.embedded.app.WatchfaceConfigActivity.(anonymous) )'
Unknown entity ''OnConnectionFailedListene'
Method
com.google.android.gems.common.Api.GoggleApiClient.builder.addOnConnectionFailedListener(com.google.android.gems.common.Api.GoggleApiClient.builder.OnConnectionFailedListener)'in
com.google.android.gems.common.Api.GoggleApiClient.Builder' connot be applied to '(com.example.android.wearable.embedded.app.WatchfaceConfigActivity.(anonymous) )'
答案 0 :(得分:0)
我明白了。我必须为每个添加导入。
我还有一个问题。顺便说一句,我对Android开发很新。我收到警告:无法访问变量' phonebattery'。我取代了'模式'与电话电话'你在这里回答:Android Wear Watchface Settings on host