Search code examples
javaandroidandroid-studioandroid-studio-2.1

Every time I try to run my app on the android studio emulator I get error


I'll copy and paste the message from the message gradle build.

Error:(14, 5) error: illegal start of expression

Error:(14, 12) error: illegal start of expression

Error:(14, 28) error: ';' expected

Error:(14, 35) error: ';' expected

Error:(18, 2) error: reached end of file while parsing

:app:compileDebugJavaWithJavac FAILED

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

Compilation failed; see the compiler error output for details.

Information:BUILD FAILED

Information:Total time: 15.311 secs

Information:6 errors 

Information:0 warnings

Information:See complete output in console 

Solution

  • What IDE you use? Re-check your code. There must be few lines with marked by red cross or similar. In error it says few semicolons are missing. You may probably forgot to put semicolons or it may be just caused from bracket/braces structure error. Just check the marked lines and few lines above and below. And if you put your code here, it might help others to help you.