Android com.google.ads.AdView未能实例化?

Android com.google.ads.AdView未能实例化?,android,admob,Android,Admob,我无法将admob添加到我的应用程序 我将jar文件导入到我的项目中 我向清单中添加了权限和活动 enter code here <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.oodevs.treasurerapp" androi

我无法将admob添加到我的应用程序

我将jar文件导入到我的项目中

我向清单中添加了权限和活动

enter code here
       <?xml version="1.0" encoding="utf-8"?>
       <manifest xmlns:android="http://schemas.android.com/apk/res/android"
       package="com.oodevs.treasurerapp"
       android:versionCode="1"
      android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="10"
    android:targetSdkVersion="15" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.Light" >
    <activity
        android:name="com.google.ads.AdActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
    <activity
       ..
    </activity>
在此处输入代码

你调查过了吗?是的。我跟着所有的步骤走。。错误仍然存在。您是否已将GoogleedMobadSDK放入libs文件夹中…是的,我已将其放入lib文件夹中..是否已执行此操作。//创建adView adView=new adView(这个,AdSize.BANNER,MY_AD_UNIT_ID);//查找线性布局(假设已给定)//android:id=“@+id/mainLayout”LinearLayout layout=(LinearLayout)findViewById(R.id.mainLayout);//将adView添加到it布局中。添加视图(adView);//启动一个通用请求,用ad adView.loadAd(new AdRequest())加载它;
enter code here
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="@color/backgroung"
android:gravity="center"
android:orientation="vertical"
tools:context=".MainActivity" >

<com.google.ads.AdView
    android:id="@+id/adView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    ads:adSize="BANNER"
    ads:adUnitId="MY_AD_UNIT_ID"
    ads:loadAdOnCreate="true"
    ads:testDevices="TEST_EMULATOR, TEST_DEVICE_ID" />