Bummer! You must be logged in to access this page.

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

Got 2 errors in Style.xml file (1) Top level element isn't completed (2) valid xml documents must have aroot tag

Got 2 errors in Style.xml file

(1) Top level element isn't completed (2) valid xml documents must have a root tag

6 Answers

Post your Style.xml code here please.

<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Holo.Light.Dialog.NoActionBar">

<!-- Customize your theme here. --> </style>

</resources>

Try adding this before code

<?xml version="1.0" encoding="utf-8"?>
<resources>

and this after

</resources>

ok

but I cant Run my App . when I press the Run menu ,bottom of the Edit configaration .." Default Activity not found "

Ok, but did this fix your string.xml errors?

no it does not fix yet

my errors are ...in the "" Style.xml "" file .plz cheack over there