title: How to solve Content is not allowed in Prolog error for pdf files?
body: <p>I am trying to implement rendering/viewing pdf file by using PdfRenderer API.So I have created a assets folder in res(resources) which has a pdf file named sample.pdf. The following is what my build.gradle file looks like.</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 23
      buildToolsVersion "23.0.3"
  
      defaultConfig {
          applicationId "org.inevitablesol.com.demopdf"
          minSdkVersion 21
          targetSdkVersion 23
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      testCompile 'junit:junit:4.12'
      compile 'com.android.support:appcompat-v7:23.4.0'
  }
  
  //adding aaptOptions
  android {
      aaptOptions {
          noCompress "pdf"
      }
  }
  </code></pre>
  
  <p>And 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="org.inevitablesol.com.demopdf"&gt;
  
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/&gt;
  
      &lt;application
          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"&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;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <blockquote>
    <p>When I build my project I get the following errors: Error:(1, 1)
    Error: Content is not allowed in prolog. :app:mergeDebugResources
    FAILED Error:Execution failed for task ':app:mergeDebugResources'.</p>
    
    <blockquote>
      <p>C:\Users\AndroidNewBee\AndroidStudioProjects\DemoPdf\app\src\main\res\assets\sample.pdf:1:1:
      Error: Content is not allowed in prolog. Build Failed.</p>
    </blockquote>
  </blockquote>
  
  <p>I am new to programming so any help or suggestion is appreciated.Thank you.</p>