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
Razvan Sighinas
2,018 Pointscontent is not allowed in prolog.
i have encountered a similar error as in this reference "Content is not allowed in prolog." error in Android Studio, but there is no solution in it. Please advice.
Error encountered:
Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources] :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72221Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42221Library UP-TO-DATE :app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:generateDebugAssets UP-TO-DATE :app:mergeDebugAssets UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources Error:Content is not allowed in prolog. F:\android\FunFacts_start-android\Zodiac\app\src\main\res\drawable_2\imaginefundal.png Error:(1, 1) Error: Content is not allowed in prolog. :app:mergeDebugResources FAILED Error:Execution failed for task ':app:mergeDebugResources'.
F:\android\FunFacts_start-android\Zodiac\app\src\main\res\drawable_2\imaginefundal.png:1:1: Error: Content is not allowed in prolog. Information:BUILD FAILED Information:Total time: 5.181 secs Information:3 errors Information:0 warnings Information:See complete output in console
Steps to reproduce the issue:
1) Use Android Studio 1.3.2 2) Create new project for "Build a Weather App" (course material) 3) Run project using emulator -> error occurred
Please advice.
Regards,
Razvan Sighinas
1 Answer
Steve Hunter
57,712 PointsHi there,
The issue is something to do with a file that you've imported: F:\android\FunFacts_start-android\Zodiac\app\src\main\res\drawable_2\imaginefundal.png.
The drawable_2 part is probably the problem - have you dragged an entire folder across which has replicated the drawable folder?
I would suggest checking that, deleting the new folder entirely and dragging the .png files across within their own folders - e.g. clear_day.png is a folder with 4 .png files within it.
That would be my first inclination - but I haven't seen that error before so it's just my best guess.
Steve.
Razvan Sighinas
2,018 PointsRazvan Sighinas
2,018 PointsThank you.That file was the problem.
Razvan
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsGlad to help! :-)