Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Taylor Merrill
Taylor Merrill
268 Points

Execution failed for task ':app.compileDebugJavaWithJavac'.

Messages Gradle Build:

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

Compilation failed; see the compiler error output for details. C:\Users\Taylor\AndroidStudioProjects\FunFacts\app\src\main\java\com\taylor\funfacts\FunFactsActivity.java Error:(27, 44) error: ';' expected :app:compileDebugJavaWithJavac FAILED

2 Answers

Seth Kroger
Seth Kroger
56,413 Points

This message means there is a syntax error in your code (specifically on line 27), i.e., it doesn't follow the proper structure for Java code and the compiler can't make sense of it at that point. If you open FunFactsActivity.java in you should see a red square in the upper right which means are errors in the code. Pressing F2 will jump the editor's cursor to the first error (and next error on subsequent presses if there are more).

If you have trouble figuring out what is wrong, feel free to share your code here.

Taylor Merrill
Taylor Merrill
268 Points

Cha Ching! I missed a lame ; Thanks for the help!