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 Build a Weather App Concurrency and Error Handling Making Our Code Asynchronous

michael lee
michael lee
5,179 Points

error: unexpected element <user-permission> found in <manifest>.

I did exactly as the teacher says, and this error pops out, why?

<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.teamtreehouse.stormy"
          xmlns:android="http://schemas.android.com/apk/res/android">
<user-permission android:name = "android.permission.INTERNET"/>
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>

</manifest>

2 Answers

Hi. It's not <user-permission> but <uses-permission>.

Emmanuel C
Emmanuel C
10,636 Points

The error is saying there is something wrong with the element <user-permission>. Go back to the video and compare that specific tag with the instructors. Computers tend to be very picky about spelling ;)