3

我们昨天在市场上发布了一个应用程序,我发现它没有安装在 HTC/索尼爱立信手机上。我终于可以拿到一部 HTC 手机并获得以下 logcat,但无法调试和解决问题

设备信息

build.board: montblanc
build.bootloader: s1
build.brand: SEMC
build.cpu_abi: armeabi-v7a
build.cpu_abi2: armeabi
build.device: LT22i
build.display: 6.1.1.B.1.54
build.fingerprint: SEMC/LT22i_1261-6006/LT22i:4.0.4/6.1.1.B.1.54/ybt3zw:user/release-keys
build.hardware: st-ericsson
build.host: BuildHost
build.id: 6.1.1.B.1.54
build.manufacturer: Sony
build.model: LT22i
build.product: LT22i_1261-6006
build.radio: unknown
build.serial: CB5121XDB7
build.tags: release-keys
build.time: 1350305827000
build.type: user
build.user: BuildUser
version.codename: REL
version.incremental: ybt3zw
version.release: 4.0.4
version.sdk_int: 15

原木猫

01-23 00:09:35.735 E/AndroidRuntime(29152): FATAL EXCEPTION: main
01-23 00:09:35.735 E/AndroidRuntime(29152): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.m7.nomad/com.m7.nomad.SplashActivity}: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.app.ActivityThread.access$600(ActivityThread.java:127)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.os.Looper.loop(Looper.java:137)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.app.ActivityThread.main(ActivityThread.java:4448)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at java.lang.reflect.Method.invokeNative(Native Method)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at java.lang.reflect.Method.invoke(Method.java:511)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at dalvik.system.NativeStart.main(Native Method)
01-23 00:09:35.735 E/AndroidRuntime(29152): Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.view.LayoutInflater.createView(LayoutInflater.java:606)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2712)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2772)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.app.Activity.setContentView(Activity.java:1835)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at com.m7.nomad.SplashActivity.onCreate(SplashActivity.java:46)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.app.Activity.performCreate(Activity.java:4465)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
01-23 00:09:35.735 E/AndroidRuntime(29152):     ... 11 more
01-23 00:09:35.735 E/AndroidRuntime(29152): Caused by: java.lang.reflect.InvocationTargetException
01-23 00:09:35.735 E/AndroidRuntime(29152):     at java.lang.reflect.Constructor.constructNative(Native Method)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.view.LayoutInflater.createView(LayoutInflater.java:586)
01-23 00:09:35.735 E/AndroidRuntime(29152):     ... 25 more
01-23 00:09:35.735 E/AndroidRuntime(29152): Caused by: java.lang.NumberFormatException: Invalid int: "res/drawable-hdpi/ic_menu_share.png"
01-23 00:09:35.735 E/AndroidRuntime(29152):     at java.lang.Integer.invalidInt(Integer.java:138)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at java.lang.Integer.parse(Integer.java:375)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at java.lang.Integer.parseInt(Integer.java:366)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:123)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.content.res.TypedArray.getInt(TypedArray.java:254)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.view.View.<init>(View.java:2969)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.view.ViewGroup.<init>(ViewGroup.java:418)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.widget.LinearLayout.<init>(LinearLayout.java:178)
01-23 00:09:35.735 E/AndroidRuntime(29152):     at android.widget.LinearLayout.<init>(LinearLayout.java:174)
01-23 00:09:35.735 E/AndroidRuntime(29152):     ... 28 more
01-23 00:09:36.246 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:36.246 E/wpa_supplicant(11724):      53 49 47 4e 41 4c 5f 50 4f 4c 4c                  SIGNAL_POLL     
01-23 00:09:39.239 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:39.239 E/wpa_supplicant(11724):      53 49 47 4e 41 4c 5f 50 4f 4c 4c                  SIGNAL_POLL     
01-23 00:09:41.161 E/AndroidRuntime(29212): FATAL EXCEPTION: main
01-23 00:09:41.161 E/AndroidRuntime(29212): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.m7.nomad/com.m7.nomad.SplashActivity}: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.app.ActivityThread.access$600(ActivityThread.java:127)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.os.Looper.loop(Looper.java:137)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.app.ActivityThread.main(ActivityThread.java:4448)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at java.lang.reflect.Method.invokeNative(Native Method)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at java.lang.reflect.Method.invoke(Method.java:511)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at dalvik.system.NativeStart.main(Native Method)
01-23 00:09:41.161 E/AndroidRuntime(29212): Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.view.LayoutInflater.createView(LayoutInflater.java:606)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2712)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2772)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.app.Activity.setContentView(Activity.java:1835)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at com.m7.nomad.SplashActivity.onCreate(SplashActivity.java:46)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.app.Activity.performCreate(Activity.java:4465)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
01-23 00:09:41.161 E/AndroidRuntime(29212):     ... 11 more
01-23 00:09:41.161 E/AndroidRuntime(29212): Caused by: java.lang.reflect.InvocationTargetException
01-23 00:09:41.161 E/AndroidRuntime(29212):     at java.lang.reflect.Constructor.constructNative(Native Method)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.view.LayoutInflater.createView(LayoutInflater.java:586)
01-23 00:09:41.161 E/AndroidRuntime(29212):     ... 25 more
01-23 00:09:41.161 E/AndroidRuntime(29212): Caused by: java.lang.NumberFormatException: Invalid int: "res/drawable-hdpi/ic_menu_share.png"
01-23 00:09:41.161 E/AndroidRuntime(29212):     at java.lang.Integer.invalidInt(Integer.java:138)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at java.lang.Integer.parse(Integer.java:375)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at java.lang.Integer.parseInt(Integer.java:366)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:123)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.content.res.TypedArray.getInt(TypedArray.java:254)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.view.View.<init>(View.java:2969)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.view.ViewGroup.<init>(ViewGroup.java:418)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.widget.LinearLayout.<init>(LinearLayout.java:178)
01-23 00:09:41.161 E/AndroidRuntime(29212):     at android.widget.LinearLayout.<init>(LinearLayout.java:174)
01-23 00:09:41.161 E/AndroidRuntime(29212):     ... 28 more
01-23 00:09:42.252 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:42.252 E/wpa_supplicant(11724):      53 49 47 4e 41 4c 5f 50 4f 4c 4c                  SIGNAL_POLL     
01-23 00:09:45.255 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:45.255 E/wpa_supplicant(11724):      53 49 47 4e 41 4c 5f 50 4f 4c 4c                  SIGNAL_POLL     
01-23 00:09:48.268 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:48.268 E/wpa_supplicant(11724):      53 49 47 4e 41 4c 5f 50 4f 4c 4c                  SIGNAL_POLL     
01-23 00:09:51.261 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:51.261 E/wpa_supplicant(11724):      53 49 47 4e 41 4c 5f 50 4f 4c 4c                  SIGNAL_POLL     
01-23 00:09:52.061 E/AndroidRuntime(29272): FATAL EXCEPTION: main
01-23 00:09:52.061 E/AndroidRuntime(29272): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.m7.nomad/com.m7.nomad.SplashActivity}: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.app.ActivityThread.access$600(ActivityThread.java:127)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.os.Looper.loop(Looper.java:137)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.app.ActivityThread.main(ActivityThread.java:4448)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at java.lang.reflect.Method.invokeNative(Native Method)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at java.lang.reflect.Method.invoke(Method.java:511)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at dalvik.system.NativeStart.main(Native Method)
01-23 00:09:52.061 E/AndroidRuntime(29272): Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.view.LayoutInflater.createView(LayoutInflater.java:606)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2712)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2772)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.app.Activity.setContentView(Activity.java:1835)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at com.m7.nomad.SplashActivity.onCreate(SplashActivity.java:46)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.app.Activity.performCreate(Activity.java:4465)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
01-23 00:09:52.061 E/AndroidRuntime(29272):     ... 11 more
01-23 00:09:52.061 E/AndroidRuntime(29272): Caused by: java.lang.reflect.InvocationTargetException
01-23 00:09:52.061 E/AndroidRuntime(29272):     at java.lang.reflect.Constructor.constructNative(Native Method)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.view.LayoutInflater.createView(LayoutInflater.java:586)
01-23 00:09:52.061 E/AndroidRuntime(29272):     ... 25 more
01-23 00:09:52.061 E/AndroidRuntime(29272): Caused by: java.lang.NumberFormatException: Invalid int: "res/drawable-hdpi/ic_menu_share.png"
01-23 00:09:52.061 E/AndroidRuntime(29272):     at java.lang.Integer.invalidInt(Integer.java:138)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at java.lang.Integer.parse(Integer.java:375)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at java.lang.Integer.parseInt(Integer.java:366)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:123)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.content.res.TypedArray.getInt(TypedArray.java:254)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.view.View.<init>(View.java:2969)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.view.ViewGroup.<init>(ViewGroup.java:418)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.widget.LinearLayout.<init>(LinearLayout.java:178)
01-23 00:09:52.061 E/AndroidRuntime(29272):     at android.widget.LinearLayout.<init>(LinearLayout.java:174)
01-23 00:09:52.061 E/AndroidRuntime(29272):     ... 28 more

XML 文件(进行更改后)

<ImageView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:contentDescription="Splash Screen"
    android:gravity="center"
    android:src="@drawable/splash_logo" />

进行更改之前的 XML

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@color/primary_color"
    android:gravity="center"
    android:orientation="vertical"
    android:textAlignment="center" >

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:contentDescription="Splash Screen"
        android:gravity="center"
        android:src="@drawable/splash_logo" />

</RelativeLayout>
4

1 回答 1

1

请在此处发布您的 xml 代码。“由以下原因引起:android.view.InflateException:二进制 XML 文件第 24 行:膨胀类 android.widget.LinearLayout 时出错”。这一行表明第 24 行有问题。

于 2013-01-23T04:57:18.483 回答