美文网首页android 技术知识
Android 中 UnsupportedOperationEx

Android 中 UnsupportedOperationEx

作者: 追梦小乐 | 来源:发表于2018-12-03 10:05 被阅读5次

Package: tecsun.jx.yt.phone
Version Code: 5
Version Name: 2.5.4.181114
Android: 6.0.1
Manufacturer: LGE
Model: Nexus 5X
CrashReporter Key: 591D5703-F64B-0B93-90A6-31BC1F3FDB2CC92E8859
Date: Wed Nov 28 08:51:22 GMT+00:00 2018

java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx.xxx.xxx.xxx/xxx.xxx.xxx.xxx.MainActivity}: android.view.InflateException: Binary XML file line #15: Can't convert to dimension: type=0x1
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
    at android.app.ActivityThread.-wrap11(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5421)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: android.view.InflateException: Binary XML file line #15: Can't convert to dimension: type=0x1
    at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
    at android.support.v7.app.AppCompatDelegateImplV9.b(Unknown Source)
    at android.support.v7.app.AppCompatActivity.setContentView(Unknown Source)
    at tecsun.jx.yt.phone.MainActivity.onCreate(Unknown Source)
    at android.app.Activity.performCreate(Activity.java:6251)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
    ... 9 more
Caused by: java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x1
    at android.content.res.TypedArray.getDimensionPixelSize(TypedArray.java:666)
    at android.view.ViewGroup$MarginLayoutParams.<init>(ViewGroup.java:7098)
    at android.widget.LinearLayout$LayoutParams.<init>(LinearLayout.java:1911)
    at android.widget.LinearLayout.generateLayoutParams(LinearLayout.java:1816)
    at android.widget.LinearLayout.generateLayoutParams(LinearLayout.java:1814)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:837)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:971)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:831)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
    ... 17 more


这个很大可能是android手机屏幕适配的问题,可以从自己的项目中定位排查问题

image.png
image.png

相关文章

网友评论

    本文标题:Android 中 UnsupportedOperationEx

    本文链接:https://www.haomeiwen.com/subject/pzqwxqtx.html