title: com.google.ads.AdView : The following classes could not be found
body: <p>I am trying to integrate admob ads in my application but I am getting this error. </p>
  
  <p>"The following classes could not be found:
  - com.google.ads.AdView "</p>
  
  <p>Main XML Layout Code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
      android:layout_width="wrap_content"
      android:layout_height="match_parent"
      android:background="@drawable/background" &gt;
  
      &lt;com.google.ads.AdView 
      android:id="@+id/ad"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      ads:adSize="BANNER"    
      ads:adUnitId="My_Add_Id"
      ads:loadAdOnCreate="true" /&gt;
  </code></pre>
  
  <p>Mainifest file is as follows:</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.solutionproviders.bajiascooking"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&gt;
  
  
      &lt;uses-sdk android:targetSdkVersion="16" 
                android:minSdkVersion="9"/&gt;
  
  
      &lt;application
          android:allowBackup="true"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
  
          &lt;activity
              android:name=".Main"
              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 android:name="com.google.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/&gt;
  
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>I am using Google play services for adding ads.</p>
  
  <p><img src="https://i.stack.imgur.com/AIj5f.png" alt="Library added in android folder"></p>
  
  <p><img src="https://i.stack.imgur.com/XFNCL.png" alt="Library in Private and Android Dependencies"></p>
  
  <p><img src="https://i.stack.imgur.com/zusly.png" alt="Error as shown in XML Layout "></p>
  
  <p>I am checked all the solutions provided on Stakeoverflow but none worked for me. Please suggest me a solution. Any other info will be provided but I think I have provided enough info for the problem. </p>