After upgrading to appcompat 25.1.0
I've started getting wired errors.
In my code:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
I get lint error:
AppCompatActivity.onCreate can only be called from within the same library group (groupId=com.android.support)
How to prevent such behavior?
As previous responses highlighted, it is bug. I recommend not to disable the specific lint warning project-wide, but for that method only. Annotate your method as follows:
@SuppressLint("RestrictedApi")
@Override
public void setupDialog(Dialog dialog, int style) {
super.setupDialog(dialog, style);
//your code here
}