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 trialChris Wolchesky
12,025 PointsGradle build errors in Android Studio: Content is not allowed in prolog
I imported the latest version of the Parse library for setting up Push Notifications today and I'm getting a new Gradle build error after doing so. I've done some initial searches and from what I'm gathering, this can be caused from invalid XML files, which is all well and fine, but it's indicating one of the drawable (PNG) resources is causing the issue. I've tried to just remove the drawable from the project just to see if it'd move on, but the next resource triggers the same error ad-infinum. Any insight where to look for resolution would be appreciated!
1 Answer
Chris Wolchesky
12,025 PointsFound the answer. I only found the solution after looking at the files in Explorer instead of Android Studio. Windows had encrypted the files for some reason or another. Once I turned off file encryption they were able to be included and the build completed fine.
Chris Wolchesky
12,025 PointsChris Wolchesky
12,025 PointsI got a stack trace of the error from Gradle. I'm not sure of what I'm reading here, truth be told. Also, to provide more information: I've attempted to restore the previous Parse library (1.6.0) and still get the same error, I've done a clean rebuild, and I've also Invalidated the Cache in Android Studio and restarted, still seeing the same error!