title: The <uses-permission> element must be a direct child of the <manifest> root element
body: <p>I'm trying to run my android app but I'm getting the following error The  element must be a direct child of the  root element and The element type "application" must be terminated by the matching end-tag "". Can somebody write me the 'correct' version of it? Thanks.</p>
  
  <p>This is my manifest file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.daytraders"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="19" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name="com.example.daytraders.Login"
              android:label="@string/app_name" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/activity&gt;
      &lt;activity android:label="@string/app_name" android:name="Profile"&gt;
          &lt;/activity&gt;
          &lt;activity android:label="Day Traders USER PANEL" android:name="Main"&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
       &lt;!-- Allow to connect with internet and to know the current network state--&gt;
      &lt;uses-permission android:name="android.permission.INTERNET"&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"&gt;
    &lt;/uses-permission&gt;&lt;/uses-permission&gt;&lt;/manifest&gt;
  </code></pre>