0

I recently saw AlertDialog, I want to look at his source code, follow up, found the AlertController file, and then in its AlertController .setupView() method,

final View parentPanel = mWindow.findViewById(R.id.parentPanel);
final View defaultTopPanel = parentPanel.findViewById(R.id.topPanel);
final View defaultContentPanel = parentPanel.findViewById(R.id.contentPanel);
final View defaultButtonPanel = parentPanel.findViewById(R.id.buttonPanel);

Prompt me Cannot resolve symbol 'R', if I want to see the corresponding xml file, or I can click in, what should I do?

AlertController .setupView()

final View parentPanel = mWindow.findViewById(R.id.parentPanel);
final View defaultTopPanel = parentPanel.findViewById(R.id.topPanel);
final View defaultContentPanel = parentPanel.findViewById(R.id.contentPanel);
final View defaultButtonPanel = parentPanel.findViewById(R.id.buttonPanel);
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
da fa
  • 197
  • 1
  • 1
  • 8

1 Answers1

0

Close the project. Delete .gradle , .idea folders of the project and then reopen the project. and then try a fresh re-build and then you're good to go.

Else try invalidate caches and restart.

pramod_m
  • 184
  • 1
  • 9