1
스타일 가능한 속성에 대한 참조를 생성 할 때 R.java 파일 생성시 문제가있는 것으로 보입니다.R.java의 참조가 최종적이 아님
필드의 선언이 final
일 것으로 예상되지만 그렇지 않습니다. 어째서?
고해상도/값/attrs.xml이
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="MyTextView">
<attr name="typeface" format="string"/>
</declare-styleable>
</resources>
세대/com.example/R.java는 R.java 내부
/**
<p>This symbol is the offset where the {@link com.example.R.attr#typeface}
attribute's value can be found in the {@link #MyTextView} array.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>: <i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>: [<i>type</i>:]<i>name</i></code>") containing a value of this type.
@attr name com.example:typeface
*/
public static int MyTextView_typeface = 0;
http://tools.android.com/tips/non-constant-fields 어떻게'R.java' 생성 (왜) 내가 여기에 누군가가 –
체크 아웃 업데이트 jucas '대답에 대답 할 수 있다고 생각하지 않는 일부 내부입니다. 맞습니다. –