Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
XML
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:ads="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="in.kassapos.admob_app.MainActivity" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world" />
 <com.google.android.gms.ads.AdView android:id="@+id/adView"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         ads:adUnitId="ca-app-pub-1276202305869951/2774122222"
                         ads:adSize="BANNER"/>
</RelativeLayout>

i used this xml file but still i am getting error "
java.lang.RuntimeException: Unable to start activity ComponentInfo{in.kassapos.admob_app/in.kassapos.admob_app.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
"
Posted
Updated 8-Jul-14 3:51am
v2
Comments
E.F. Nijboer 8-Jul-14 9:23am    
Would be nice if you included the error. Click improve question to add more details.
Nandhini Devi 8-Jul-14 9:51am    
i have updated

A quick search resulted in:
Do not use API Level of 20 and Platform 4.4W, as Android Virtual Device. With Level 19 and Platform 4.2.2 set on ADV everything runs as it should.

http://stackoverflow.com/questions/24501374/targetsdkversion-setting[^]

Good luck!
 
Share this answer
 
nevermind, just add to "E.F. Nijboer" solution.

Android 4.4.2 (API 19)
User Target SDK API - 17
Compile with version 19 it worked for me
 
Share this answer
 
any luck for this error, please share as i am also in the same boat
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900