Error: Attribute "" is a used in API level and higher (current min is 10)
Problem Recurrence:
1. The problem encountered in the XML layout is due to the fact that the least compatible API is configured.
For example, configure in Androidmanifest:
<uses-sdk
Android:minsdkversion= "10"
Android:targetsdkversion= "/>"
2, compatible to API 10 is 2.3.3 system.
3. The Api21 attribute is used in the layout at this time:android:transitionname= "y"
< Relativelayout
android:id="@+id/titlelayout"
android:transitionname= "y"
android:layout_width= "Match_parent"
android:layout_height= "45DP"
Android:background= "@color/redcolor" >
4, you will be warned: Attribute "Transitionname" is only used at API level and higher (current min is
10)
5. The solution is to create a new values-xx based on the version of the attribute, according to the above example, we need to create a new values-v21 file
Create a new styles.xml in there.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/71/37/wKioL1XJY1zBYJCRAAKvpapa7Fc676.jpg "title=" 0cfb1f14-bbc7-4c4c-a971-e05a0a5a8a2e.png "alt=" Wkiol1xjy1zbyjcraakvpapa7fc676.jpg "/>
6. Introduce the style in the code
< Relativelayout
android:id="@+id/titlelayout"
style= "@style/transitionname"
android:layout_width="Match_parent"
android:layout_height="45DP"
android:background="@color/redcolor" >
Done, VALUES-V21 is a version of the resources
Attribute xx is only used in API level XX and higher (current min is xx) workaround