布局错误: -

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:tools="http://schemas.android.com/tools"
    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=".MainActivity" >

<com.startapp.android.publish.banner.Banner

     android:id="@+id/startAppBanner"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:layout_alignParentBottom="true"
     android:layout_alignRight="@+id/next"
     android:layout_marginBottom="14dp" >

 </com.start app.android.publish.banner.Banner>

</Relative Layout>

com.android.ide.eclipse.adt.internal.project.project.androidmanifesthelper] PARSER e: 1-12-13至31-12-13 1-12-13 1-12-13 hellobanner androidmanifest.xml:属性的值与元素类型“ null”关联的“ android:value”不得包含'<'字符。 [2013-12-03 19:48:19-Hellobanner] XML文件中的错误:流产构建。

有帮助吗?

解决方案 2

横幅的大小存在问题...因此,横幅在设备上的布局中没有外观.....我在另一个手机设备代码中进行了测试,已成功运行

默认情况下,布局代码非常适合3D横幅的广告.....

Gem_ram先生在此案中是错误的........

现在原始代码正常运行

其他提示

请使用它来删除XML文件中的错误。还可以根据消息创建类。相应地更新您的清单文件,然后分享您的错误消息,然后...

为了进一步帮助您,我为您创建了一个类文件:banner.java ===>这将删除错误

public class Banner extends View {

    public Banner(Context context) {
        super(context);
        // TODO Auto-generated constructor stub
    }
}

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:tools="http://schemas.android.com/tools"
    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=".MainActivity" >

<com.startapp.android.publish.banner.Banner

     android:id="@+id/startAppBanner"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:layout_alignParentBottom="true"
     android:layout_alignRight="@+id/next"
     android:layout_marginBottom="14dp" >

 </com.startapp.android.publish.banner.Banner>

</RelativeLayout>

该横幅可以直接在设备中打开,没有任何问题: -

 android:id="@+id/startAppBanner"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:layout_alignParentBottom="true"
 android:layout_alignRight="@+id/next"
 android:layout_marginBottom="14dp" >

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top