Caused by: java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x1

在有些设备上可以正常运行,有些设备上不能,那么问题很有可能是资源文件(图片、dimen)不全。

 FATAL EXCEPTION: main
 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sohutv.tv/com.sohutv.tv.work.videodetail.fourk.activity.VideoDetail4Kactivity}: android.view.InflateException: Binary XML file line #24: Error inflating class <unknown>
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
  at android.app.ActivityThread.access$600(ActivityThread.java:141)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:137)
  at android.app.ActivityThread.main(ActivityThread.java:5041)
  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:793)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
  at dalvik.system.NativeStart.main(Native Method)
 Caused by: android.view.InflateException: Binary XML file line #24: 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.rInflate(LayoutInflater.java:746)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
  at android.app.Activity.setContentView(Activity.java:1905)
  at com.sohutv.tv.work.videodetail.fourk.activity.VideoDetail4Kactivity.onCreate(VideoDetail4Kactivity.java:108)
  at android.app.Activity.performCreate(Activity.java:5128)
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090)
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
  ... 11 more
 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)
  ... 26 more
 Caused by: java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x1
  at android.content.res.TypedArray.getDimensionPixelSize(TypedArray.java:463)
  at android.view.View.<init>(View.java:3340)
  at android.view.ViewGroup.<init>(ViewGroup.java:431)
  at android.widget.LinearLayout.<init>(LinearLayout.java:176)
  at android.widget.LinearLayout.<init>(LinearLayout.java:172)
  ... 29 more

你可能感兴趣的:(Caused by: java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x1)