Share a Python approach to solving Android compatibility issues

Source: Internet
Author: User
This article mainly describes the Android compatibility issues: Java.lang.UnsupportedOperationException solutions to the relevant information, the need for friends can refer to the following

In the development of the previous few days, encountered such a very strange unusual, some mobile phones can be run, some phones are directly on the collapse, today, this abnormal collation.

The first thing is to paste the exception information.

E/androidruntime:fatal EXCEPTION:mainandroid.view.InflateException:Binary XML file line #13: 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.parseInclude (layoutinflater.java:830) at Android.view.LayoutInflater.rInflate (layoutinflater.java:736) 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 Com.hy.taotao.utils.GlobalUtils.inflate ( globalutils.java:91) at Com.hy.taotao.base.BaseFragment.onCreateView (basefragment.java:59) ... caused By:java.lang.reflect.InvocationTarGetexceptionat java.lang.reflect.Constructor.constructNative (Native Method) at Java.lang.reflect.Constructor.newInstance (constructor.java:417) at Android.view.LayoutInflater.createView ( layoutinflater.java:587) at Com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView ( PHONELAYOUTINFLATER.JAVA:56)?... caused By:java.lang.UnsupportedOperationException:Can ' t convert to dimension:type=0x1at Android.content.res.TypedArray.getDimensionPixelSize (typedarray.java:468) at Android.widget.textview.<init > (textview.java:944) at android.widget.textview.<init> (textview.java:605) 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)?...

I sorted out the main exception information above, first of all we can look at this sentence, we can get from the above information is "XML file 13 line caused by the error, because the dimension file cannot find the type=0x1 element", Later colleagues on the Internet to find more than n data said that the values within the default values, and finally found the missing default value ...

1. First read the paper before the wrong folder, you can see in a part of the values-v19 file, in the values are not visible, and the Values-v19 folder is Api19 device use folder in this directory, when the device cannot find the corresponding named values-* folder, you will find the default values folder under the file, then you can not find it, the above exception occurred.

2. Then if you know the problem, you have to solve it.

1) Delete all values-*** after backup.

2) Add the files in the values-*** after the backup to the default values folder.

3. In fact, in the above 2 this way is generally not recommended, if the phone screen is suitable, of course, can not only keep the values of this default folder, but remember that in other values-* folder elements, in the default values folder must have.

4. The following is a simple process

Summarize:

1. In the case of third-party integration and so on, remember: in the other values-* folder elements, in the default values folder must have.

"Recommended"

1. Special recommendation : "PHP Programmer Toolkit" V0.1 version download

2. Python Free video tutorial

3. Python Object-oriented video tutorial

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.