添加xml文件时出错 [英] getting error in adding xml file

查看:94
本文介绍了添加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使用了这个xml文件,但我仍然收到错误


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.

推荐答案

快速搜索导致:

不要使用API​​级别20和平台4.4W,作为Android虚拟设备。在ADV上设置Level 19和Platform 4.2.2,一切都按预期运行。



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



祝你好运!
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!


nevermind,只需添加EF Nijboer解决方案。



Android 4.4.2(API 19)

用户目标SDK API - 17
编译它为我工作的版本19
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


运气错误,请分享,因为我也在同一条船上
any luck for this error, please share as i am also in the same boat


这篇关于添加xml文件时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆