title: My Android manifest is full of errors after updating to Android 3.0.0
body: <p>I'm badly stuck after updating to Android 3.0.0 and gradle update to 4.1. My app is not building and the manifest contains a lot of errors. I tried cleaning the project under <code>Build</code>, invalidate caches/restart under <code>Files</code>, without success.</p>
  
  <p>The errors I recieve are as following:</p>
  
  <blockquote>
    <p>Error:(52) error: unknown element  found.<br>
    Error:(52) unknown element  found.<br>
    Error:java.util.concurrent.ExecutionException:  java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception:   AAPT2 error: check logs for details<br>
    Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details<br>
    Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details<br>
    Error:Execution failed for task ':app:processDebugResources'.<br>
    Failed to execute aapt</p>
  </blockquote>
  
  <p>All errors are in <code>debug\AndroidManifest</code>. When I delete or comment the marked activities, they're getting added back on gradle build,</p>
  
  <p>I'm also getting an 'URI not registrered error too with <code>android="http://schemas.android.com/apk/res/android"</code>'</p>
  
  <p>Manifest:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="sample.app"
      android:installLocation="auto"
      android:versionCode="48"
      android:versionName="4.8" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="19"
          android:targetSdkVersion="25" /&gt;
      //Hardware Constraints for Application
      &lt;uses-feature android:name="android.hardware.location.gps" /&gt;
  
      &lt;!-- &lt;uses-feature android:name="android.hardware.location.network" /&gt; --&gt;
  
      //Required App Permissions
      &lt;uses-permission android:name="android.permission.READ_CONTACTS" /&gt;
      &lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.VIBRATE" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
      &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.BLUETOOTH" /&gt;
      &lt;uses-permission android:name="android.permission.READ_SMS" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_CONTACTS" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&gt;
      &lt;uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /&gt;
      &lt;uses-permission android:name="android.permission.READ_CALL_LOG" /&gt;
      &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
      &lt;uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /&gt;
      &lt;uses-permission android:name="android.permission.RECEIVE_SMS" /&gt;
      &lt;uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" /&gt;
      &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt;
      &lt;uses-permission android:name="android.permission.USE_CREDENTIALS" /&gt;
      &lt;uses-permission android:name="android.permission.MANAGE_ACCOUNTS" /&gt;
      &lt;uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" /&gt;
      &lt;uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT" /&gt;
      &lt;uses-permission android:name="android.permission.CALL_PHONE" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" /&gt;
      &lt;uses-permission android:name="android.permission.SEND_SMS" /&gt;
      &lt;uses-permission android:name="android.permission.CAMERA" /&gt;
      &lt;uses-permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT" /&gt;
  
      &lt;uses-permission-sdk-23 android:name="android.permission.MODIFY_PHONE_STATE" /&gt;
  
      &lt;uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /&gt;
  
      &lt;meta-data
          android:name="android.support.VERSION"
          android:value="25.3.1" /&gt;
  
      &lt;activity android:name="com.box.androidsdk.content.auth.OAuthActivity" /&gt;
  
      &lt;uses-feature
          android:name="android.hardware.sensor.accelerometer"
          android:required="true" /&gt; &lt;!-- Permissions required for GCM --&gt;
      &lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /&gt;
  
      &lt;uses-feature
          android:glEsVersion="0x00020000"
          android:required="true" /&gt;
  
      &lt;permission
          android:name="sample.app.permission.C2D_MESSAGE"
          android:protectionLevel="signature" /&gt;
  
      &lt;uses-permission android:name="sample.app.permission.C2D_MESSAGE" /&gt;
      &lt;!--
    &lt;uses-feature
            android:name="android.hardware.camera2.full"
            android:required="true" /&gt;
      --&gt;
      &lt;!--
     &lt;uses-feature
             android:name="android.hardware.sensor.accelerometer"
             android:required="true" /&gt;
      --&gt;
      &lt;application
          android:name="sample.app.dailymotion.volleyapp.AppController"
          android:allowBackup="true"
          android:debuggable="true"
          android:hardwareAccelerated="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:largeHeap="true"
          android:supportsRtl="true"
          android:theme="@style/AppTheme" &gt;
  
          &lt;!--
               &lt;meta-data
               android:name="com.google.android.gms.vision.DEPENDENCIES"
               android:value="barcode"/&gt;
          --&gt;
          &lt;activity android:name="sample.app.SplashScreen" &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
              android:name="sample.app.ClrInfo"
              android:exported="false"
              android:theme="@style/MyDialogTheme" /&gt;
  
  &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>