I am working on simple android app that contain Admob banner, but when I run the app I get this message:
unfortunately the app has stopped
here is my code:
xml layout:
 <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.ajater.mj.vaccalc.MainActivity"
xmlns:ads="http://schemas.android.com/apk/libs/com.google.ads">
   <com.google.ads.AdView
    xmlns:ads="http://schemas.android.com/apk/libs/com.google.ads"
    android:id="@+id/adView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    ads:loadAdOnCreate="true"
    ads:adSize="BANNER"
    ads:adUnitId="------------------" />
   </android.support.design.widget.CoordinatorLayout>
mainactivity
    AdView adView = (AdView)findViewById(R.id.adView);
    AdRequest adRequest = new AdRequest.Builder().build();
    adView.loadAd(adRequest);
AndroidManifest
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="my.app.name">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
 
     
    