android.view.InflateException:无法启动活动com.google.gms.ads.adview

时间:2018-08-16 14:26:59

标签: android xml layout ads

我在将Firebase添加到Android应用程序时遇到了麻烦。我似乎无法确切地确定何时发生这种情况,但是我可以向您保证我已经正确实现了Firebase,并且此问题仅在以后发生。

08-16 15:18:18.953 20979-20979/com.android.app E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.android.app, PID: 20979
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.app/com.android.app.MainActivity}: android.view.InflateException: Binary XML file line #135: Binary XML file line #135: Error inflating class com.google.android.gms.ads.AdView
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
    at android.app.ActivityThread.-wrap11(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
 Caused by: android.view.InflateException: Binary XML file line #135: Binary XML file line #135: Error inflating class com.google.android.gms.ads.AdView
 Caused by: android.view.InflateException: Binary XML file line #135: Error inflating class com.google.android.gms.ads.AdView
 Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Constructor.newInstance0(Native Method)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
    at android.view.LayoutInflater.createView(LayoutInflater.java:647)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
    at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:419)
    at android.app.Activity.setContentView(Activity.java:2669)
    at com.android.app.MainActivity.onCreate(MainActivity.java:40)
    at android.app.Activity.performCreate(Activity.java:6999)
    at android.app.Activity.performCreate(Activity.java:6990)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
    at android.app.ActivityThread.-wrap11(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
 Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzwe;
    at com.google.android.gms.internal.zzmw.<init>(Unknown Source:3)
    at com.google.android.gms.internal.zzmw.<init>(Unknown Source:7)
    at com.google.android.gms.internal.zzmw.<init>(Unknown Source:7)
    at com.google.android.gms.ads.BaseAdView.<init>(Unknown Source:6)
    at com.google.android.gms.ads.AdView.<init>(Unknown Source:1)
    at java.lang.reflect.Constructor.newInstance0(Native Method) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:334) 
    at android.view.LayoutInflater.createView(LayoutInflater.java:647) 
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) 
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) 
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) 
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:515) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
    at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:419) 
    at android.app.Activity.setContentView(Activity.java:2669) 
    at com.android.app.MainActivity.onCreate(MainActivity.java:40) 
    at android.app.Activity.performCreate(Activity.java:6999) 
    at android.app.Activity.performCreate(Activity.java:6990) 
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) 
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731) 
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) 
    at android.app.ActivityThread.-wrap11(Unknown Source:0) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 
    at android.os.Handler.dispatchMessage(Handler.java:106) 
    at android.os.Looper.loop(Looper.java:164) 
    at android.app.ActivityThread.main(ActivityThread.java:6494) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 
 Caused by: java.lang.ClassNotFoundException: com.google.android.gms.internal.zzwe
    at java.lang.VMClassLoader.findLoadedClass(Native Method)
    at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    at com.google.android.gms.internal.zzmw.<init>(Unknown Source:3) 
    at com.google.android.gms.internal.zzmw.<init>(Unknown Source:7) 
    at com.google.android.gms.internal.zzmw.<init>(Unknown Source:7) 
    at com.google.android.gms.ads.BaseAdView.<init>(Unknown Source:6) 
    at com.google.android.gms.ads.AdView.<init>(Unknown Source:1) 
    at java.lang.reflect.Constructor.newInstance0(Native Method) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:334) 
    at android.view.LayoutInflater.createView(LayoutInflater.java:647) 
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) 
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) 
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) 
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:515) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
    at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:419) 
    at android.app.Activity.setContentView(Activity.java:2669) 
    at com.android.app.MainActivity.onCreate(MainActivity.java:40) 
    at android.app.Activity.performCreate(Activity.java:6999) 
    at android.app.Activity.performCreate(Activity.java:6990) 
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) 
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731) 
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) 
    at android.app.ActivityThread.-wrap11(Unknown Source:0) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 
    at android.os.Handler.dispatchMessage(Handler.java:106) 
    at android.os.Looper.loop(Looper.java:164) 
    at android.app.ActivityThread.main(ActivityThread.java:6494) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 
08-16 15:18:18.954 20979-20979/com.android.app E/AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzwg;
    ... 33 more
Caused by: java.lang.ClassNotFoundException: com.google.android.gms.internal.zzwg
    at java.lang.VMClassLoader.findLoadedClass(Native Method)
    at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        ... 33 more
 Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzew;
        ... 33 more
 Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.internal.zzew" on path: DexPathList[[zip file "/data/app/com.android.app-JHSZ7jRelBAmWYzwPbUuqQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.android.app-JHSZ7jRelBAmWYzwPbUuqQ==/lib/arm64, /system/lib64, /vendor/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        ... 33 more
08-16 15:18:18.957 20979-20979/com.android.app E/UncaughtException: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.app/com.android.app.MainActivity}: android.view.InflateException: Binary XML file line #135: Binary XML file line #135: Error inflating class com.google.android.gms.ads.AdView
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
    at android.app.ActivityThread.-wrap11(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
 Caused by: android.view.InflateException: Binary XML file line #135: Binary XML file line #135: Error inflating class com.google.android.gms.ads.AdView
 Caused by: android.view.InflateException: Binary XML file line #135: Error inflating class com.google.android.gms.ads.AdView
 Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Constructor.newInstance0(Native Method)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
    at android.view.LayoutInflater.createView(LayoutInflater.java:647)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
    at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:419)
    at android.app.Activity.setContentView(Activity.java:2669)
    at com.android.app.MainActivity.onCreate(MainActivity.java:40)
    at android.app.Activity.performCreate(Activity.java:6999)
    at android.app.Activity.performCreate(Activity.java:6990)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
    at android.app.ActivityThread.-wrap11(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
 Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzwe;
    at com.google.android.gms.internal.zzmw.<init>(Unknown Source:3)
    at com.google.android.gms.internal.zzmw.<init>(Unknown Source:7)
    at com.google.android.gms.internal.zzmw.<init>(Unknown Source:7)
    at com.google.android.gms.ads.BaseAdView.<init>(Unknown Source:6)
    at com.google.android.gms.ads.AdView.<init>(Unknown Source:1)
    at java.lang.reflect.Constructor.newInstance0(Native Method) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:334) 
    at android.view.LayoutInflater.createView(LayoutInflater.java:647) 
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) 
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) 
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) 
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:515) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
    at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:419) 
    at android.app.Activity.setContentView(Activity.java:2669) 
    at com.android.app.MainActivity.onCreate(MainActivity.java:40) 
    at android.app.Activity.performCreate(Activity.java:6999) 
    at android.app.Activity.performCreate(Activity.java:6990) 
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) 
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731) 
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) 
    at android.app.ActivityThread.-wrap11(Unknown Source:0) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 
    at android.os.Handler.dispatchMessage(Handler.java:106) 
    at android.os.Looper.loop(Looper.java:164) 
    at android.app.ActivityThread.main(ActivityThread.java:6494) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 
 Caused by: java.lang.ClassNotFoundException: com.google.android.gms.internal.zzwe
    at java.lang.VMClassLoader.findLoadedClass(Native Method)
    at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    at com.google.android.gms.internal.zzmw.<init>(Unknown Source:3) 
    at com.google.android.gms.internal.zzmw.<init>(Unknown Source:7) 
    at com.google.android.gms.internal.zzmw.<init>(Unknown Source:7) 
    at com.google.android.gms.ads.BaseAdView.<init>(Unknown Source:6) 
    at com.google.android.gms.ads.AdView.<init>(Unknown Source:1) 
    at java.lang.reflect.Constructor.newInstance0(Native Method) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:334) 
    at android.view.LayoutInflater.createView(LayoutInflater.java:647) 
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) 
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) 
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) 
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:515) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
    at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:419) 
    at android.app.Activity.setContentView(Activity.java:2669) 
    at com.android.app.MainActivity.onCreate(MainActivity.java:40) 
    at android.app.Activity.performCreate(Activity.java:6999) 
    at android.app.Activity.performCreate(Activity.java:6990) 
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) 
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731) 
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) 
    at android.app.ActivityThread.-wrap11(Unknown Source:0) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 
    at android.os.Handler.dispatchMessage(Handler.java:106) 
    at android.os.Looper.loop(Looper.java:164) 
    at android.app.ActivityThread.main(ActivityThread.java:6494) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 
08-16 15:18:18.958 20979-20979/com.android.app E/UncaughtException: Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzwg;
    ... 33 more
Caused by: java.lang.ClassNotFoundException: com.google.android.gms.internal.zzwg
    at java.lang.VMClassLoader.findLoadedClass(Native Method)
    at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        ... 33 more
 Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzew;
        ... 33 more
 Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.internal.zzew" on path: DexPathList[[zip file "/data/app/com.android.app-JHSZ7jRelBAmWYzwPbUuqQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.android.app-JHSZ7jRelBAmWYzwPbUuqQ==/lib/arm64, /system/lib64, /vendor/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        ... 33 more

从我的第一个版本开始,此应用一直运行正常,并显示插页式广告,所以我不确定为什么Firebase突然使事情变得困难了吗?

这是我的布局文件供参考...

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/main_bg"
android:orientation="vertical"
 >

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

    <ImageView
        android:id="@+id/img_rateapp"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_weight="1"
        android:gravity="bottom|left|center"
        android:src="@drawable/ic_rating"
        android:contentDescription="@string/app_name" />

    <ImageView
        android:id="@+id/img_moreapp"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_weight="20.0"
        android:gravity="bottom|center"
        android:src="@drawable/ic_get_pro"
        android:contentDescription="@string/app_name" />

    <ImageView
        android:id="@+id/sound"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:contentDescription="@string/app_name"
        android:src="@drawable/sound" />
</LinearLayout>

<ImageView
    android:id="@+id/textViewTitle"
    android:layout_width="fill_parent"
    android:layout_height="0.0dip"
    android:layout_weight="3.0"
    android:gravity="center"
    android:src="@drawable/app_image"
    android:contentDescription="@string/app_name"/>

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:orientation="vertical" 
    android:padding="10.0dip">

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_margin="4.0dip"
        android:layout_weight="1.0"
        android:background="@color/layout_main"
        android:orientation="horizontal"
        android:paddingBottom="0.0dip"
        android:paddingLeft="0.0dip"
        android:paddingRight="0.0dip"
        android:paddingTop="12.0dip" >

        <Button
            android:id="@+id/letsPlay"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/background_button"
            android:gravity="center"
            android:text="@string/play"
            android:textColor="@color/text_kids"
            android:textSize="32.0sp"
            android:textStyle="bold" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_margin="4.0dip"
        android:layout_weight="1.0"
        android:background="@color/layout_main"
        android:orientation="horizontal"
        android:paddingBottom="0.0dip"
        android:paddingLeft="0.0dip"
        android:paddingRight="0.0dip"
        android:paddingTop="12.0dip" >

        <Button
            android:id="@+id/earncoin"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/background_button"
            android:gravity="center"
            android:text="@string/earncoin"
            android:textColor="@color/text_classic"
            android:textSize="32.0sp"
            android:textStyle="bold" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_margin="4.0dip"
        android:layout_weight="1.0"
        android:background="@color/layout_main"
        android:orientation="horizontal"
        android:paddingBottom="0.0dip"
        android:paddingLeft="0.0dip"
        android:paddingRight="0.0dip"
        android:paddingTop="12.0dip" >

        <Button
            android:id="@+id/resetAppButton"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/background_button"
            android:gravity="center"
            android:text="@string/restart"
            android:textColor="@color/text_double"
            android:textSize="30.0sp"
            android:textStyle="bold" />
    </LinearLayout>
</LinearLayout>
<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="50.0dip"
    android:orientation="horizontal"
    android:id="@+id/adlayout">

    <com.google.android.gms.ads.AdView
        android:id="@+id/adView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        ads:adSize="BANNER"
        ads:adUnitId="@string/admob_publisher_id"/>
</LinearLayout>

有人可以帮助我解决这个问题吗?

谢谢

0 个答案:

没有答案