NoSuchMethodError for Card.setText() in XE16

不羁的心 提交于 2019-12-11 03:38:04

问题


My Glass updated to XE16 last night and I've been trying out my Glassware on it. I was able to get some of them running, but I am getting NoSuchMethodErrors on Card.setText() and Card.setFootnote() calls:

java.lang.NoSuchMethodError: com.google.android.glass.app.Card.setText

I updated my AndroidStudio projects to use the Glass Development Kit Preview on API 19 (4.4.2) and the compiler doesn't balk on the calls. The Glassware throws the error when the method is executed.

Anyone else seeing the same problem?

Thanx in advance.


回答1:


This is because the Card#setText(String) method signature changed from expecting a String to a CharSequence.

You need to make sure to recompile your code with the latest GDK in order to pick up the new reference.



来源:https://stackoverflow.com/questions/23119250/nosuchmethoderror-for-card-settext-in-xe16

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!