gpt4 book ai didi

android - 当我点击广告时,我的应用在lg设备上崩溃

转载 作者:行者123 更新时间:2023-12-03 17:31:39 24 4
gpt4 key购买 nike

当我点击广告(来自admob)时,我的应用在LG设备上崩溃!有什么问题?

android.view.InflateException: Binary XML file line #21: Error inflating class <unknown> at 
android.view.LayoutInflater.createView(LayoutInflater.java:613) at
com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) at
android.view.LayoutInflater.onCreateView(LayoutInflater.java:660) at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685) at
android.view.LayoutInflater.inflate(LayoutInflater.java:466) at
android.view.LayoutInflater.inflate(LayoutInflater.java:396) at
android.view.LayoutInflater.inflate(LayoutInflater.java:352) at
com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:3090) at
com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3150) at
com.android.internal.policy.impl.PhoneWindow.getDecorView(PhoneWindow.java:1737) at
android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2683) at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2124) at
android.app.ActivityThread.access$600(ActivityThread.java:138) at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1204) at
android.os.Handler.dispatchMessage(Handler.java:99) at
android.os.Looper.loop(Looper.java:137) at
android.app.ActivityThread.main(ActivityThread.java:4952) at
java.lang.reflect.Method.invokeNative(Native Method) at
java.lang.reflect.Method.invoke(Method.java:511) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794) at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:561) at
dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException at
java.lang.reflect.Constructor.constructNative(Native Method) at
java.lang.reflect.Constructor.newInstance(Constructor.java:417) at
android.view.LayoutInflater.createView(LayoutInflater.java:587) ... 21 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=7; index=-1 at
android.view.View.<init>(View.java:3638) at
android.view.ViewGroup.<init>(ViewGroup.java:427) at
android.widget.LinearLayout.<init>(LinearLayout.java:176) at
android.widget.LinearLayout.<init>(LinearLayout.java:172) ... 24 more

................................................... ...................................................

最佳答案

LG Optimus L9 P760设备有问题。它仅在版本4.1.2中发生,我时常在我的应用程序中看到它。如果您的应用程序在任何商店中都可用,并且对您来说是一个严重的问题,请记住,您可以始终从支持的设备中禁用此设备。

我认为没有什么可担心的。就我而言,布局并不复杂,因此@Kishan提出的具有扁平化 View 层次结构的解决方案将不起作用。这只是制造商的错。

关于android - 当我点击广告时,我的应用在lg设备上崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22319452/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com