How to solve global variables problem? Like 'variablename' is not declared. It may be inaccessible due to its protection level

Hi guys!
Some time this error occurred when I want to run or debug project, If this happend, May be I must close studio, and reopen like ‘open a local project’? open rencent project like this way , until there is no error.
Any other guys have meet this error?
Studio Version: 22.10.7, system.activies 22.10.7, I have used orther versions, but the same error.


Hi @donghai

Check the below thread,It might help you


1 Like


Yes, the same issues.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.