Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Method can only be called from within the same library group [duplicate]

Tags:

java

android

I use this code

ActionMenuItemView item = (ActionMenuItemView) findViewById(R.id.my_item_id);
item.setTitle("Test String");

and get the error

ActionMenuItemView.setTitle can only be called from within the same library group (groupId=com.android.support)

I use the Android SDK 27 with Java 8 support activated. All related issues I found were bugs in previous releases of older Android versions. But I use the latest one.

The app runs though anyway. But how to get rid of that error without only suppressing it?

like image 455
juergen d Avatar asked Dec 01 '17 01:12

juergen d


1 Answers

this link

helped me out.

It seems that the FloatingActionButton was move to a new package and now uses the .show() and .hide() methods instead of setVisibility().

The post applies to Kotlin, but the method names are the same for Java.

Hope this helps someone out there.

like image 151
Manie Besselaar Avatar answered Nov 13 '22 01:11

Manie Besselaar