title: error: unexpected element <uses-sdk> found in <manifest><application>
body: <p>I'm trying to build <a href="https://github.com/qdk0901/vlctest" rel="nofollow noreferrer">this android vlctest</a> application sample, however i'm getting the below error:</p>
  
  <pre><code>Android resource linking failed
  Output:  C:\Program Files\android\workspace\vlctest-master\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml:42: error: unexpected element &lt;uses-sdk&gt; found in &lt;manifest&gt;&lt;application&gt;.
  
  Command: C:\Program Files\android\android-studio\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\466069e667720c031ae71c30fd5dfaa7\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
          E:\android\Sdk\platforms\android-28\android.jar\
          --manifest\
          C:\Program Files\android\workspace\vlctest-master\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
          -o\
          C:\Program Files\android\workspace\vlctest-master\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
          -R\
          @C:\Program Files\android\workspace\vlctest-master\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
          --auto-add-overlay\
          --java\
          C:\Program Files\android\workspace\vlctest-master\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
          --custom-package\
          com.sxx.vlctest\
          -0\
          apk\
          --output-text-symbols\
          C:\Program Files\android\workspace\vlctest-master\app\build\intermediates\symbols\debug\R.txt\
          --no-version-vectors
  Daemon:  AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
  </code></pre>
  
  <p>Please note that the manifest XML mentioned in the error (<strong>AndroidManifest.xml</strong>) is an auto-generated file under the build directory, so any changes to it would be reset after synchronization.</p>
  
  <p><strong>AndroidManifest.xml:</strong></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.sxx.vlctest"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="16"
          android:targetSdkVersion="26" /&gt;
  
      &lt;uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /&gt;
      &lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /&gt;
  
      &lt;application
          android:name="com.sxx.vlctest.VLCApplication"
          android:allowBackup="true"
          android:appComponentFactory="android.support.v4.app.CoreComponentFactory"
          android:debuggable="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:supportsRtl="true"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name="com.sxx.vlctest.MainActivity"
              android:label="@string/app_name"
              android:screenOrientation="landscape" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.VIEW" /&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;uses-sdk
              android:minSdkVersion="16"
              android:targetSdkVersion="26" /&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p><strong>I think my <code>app gradle</code> could be also helpfull:</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      buildToolsVersion "28.0.3"
  
      defaultConfig {
          applicationId "com.sxx.vlctest"
          minSdkVersion 16
          targetSdkVersion 26
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(include: ['*.jar'], dir: 'libs')
      testImplementation 'junit:junit:4.12'
      implementation 'com.android.support:appcompat-v7:28.0.0'
      implementation 'com.android.support:support-v4:+'
      implementation 'com.android.support:design:28.0.0'
      implementation project(':libvlc-3.0.0')
  }
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p><strong>Below is my main manifest file located under "app/src/main/AndroidManifest.xml":</strong></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.sxx.vlctest"&gt;
  
      &lt;uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /&gt;
      &lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
  
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&gt;
  
      &lt;application
          android:name="com.sxx.vlctest.VLCApplication"
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"&gt;
          &lt;activity
              android:name=".MainActivity"
              android:label="@string/app_name"
              android:screenOrientation="landscape"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.VIEW" /&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;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p><strong>This image might be helpful too:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/I24df.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/I24df.png" alt="Check this image"></a>
  Thanks.</p>