问题
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