大家好!我是一个Android 初学者,我遇到了一个在我看起来是相当诡异的问题,谜之missing ”}”。下面是完整截图,错误发生在第15行set ContentView(R.layout.broadcast); ,missing“}“ 就从这里开始。第35行,即倒数第二行,发生unexpected “}“错误。我一时间找不到解决办法,请教大家帮我找找原因,谢谢。
PHPz2017-04-18 10:11:56
Check carefully whether the brackets and semicolons in the code are half-width
巴扎黑2017-04-18 10:11:56
It is recommended that the questioner directly post the complete source code to facilitate the answerer to run and check the error.
No one cares about screenshots, after all, it is difficult to use the human brain to compile them.
高洛峰2017-04-18 10:11:56
I don’t know if there are too many things included here, causing some things to conflict.
Let’s look at the compilation errors.
Look at the program map, it can only be here
Maybe the compiler considers this private xxx to be a member variable, so there should be a } in front of it to end the function.