java - Android 编译报错 missing“}”
PHPz
PHPz 2017-04-18 10:09:56
0
5
358

大家好!我是一个Android 初学者,我遇到了一个在我看起来是相当诡异的问题,谜之missing ”}”。下面是完整截图,错误发生在第15行set ContentView(R.layout.broadcast); ,missing“}“ 就从这里开始。第35行,即倒数第二行,发生unexpected “}“错误。我一时间找不到解决办法,请教大家帮我找找原因,谢谢。

PHPz
PHPz

学习是最好的投资!

reply all(5)
PHPzhong

Check carefully whether the brackets and semicolons in the code are half-width

洪涛

The variables below public are private, which may cause problems.

巴扎黑

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.

大家讲道理

Curious code, and how lazy you must be

小葫芦


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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template