Error:Execution failed for task ':app:compileDebugJavaWithJavac'. > Compilat

Error:Execution failed for task ‘:app:compileDebugJavaWithJavac’. > Compilat

Description of the problem: When I was learning android when I encountered such a problem, it was really sour. I didn't know why it was wrong. I typed the code according to the video. wanna die,,,,,

The editor is here to remind you that you need to be careful when typing the code according to the video, and don't move it completely.

The following are the specific reasons

1. When the above error is caused, the problem is actually very simple. For example, the click event of a Button is played according to the video. The video may be played fast like this.

write picture description here

2. Due to the intelligence of AndroidStudio, the code is folded, but a bunch of friends can be pitted. His actual code is like this

write picture description here

If you guys don't pay attention to the first picture of the full photo, it will be miserable.

3. If you really encounter this situation, go and see if there is an arrow ""—>"" in your own code. Click with the mouse to see if you can expand the code. If you can't, this is the problem.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325479308&siteId=291194637