Android 官网提供的Custom-view 编译出错--error: No resource identifier found for attribute

error: No resource identifier found for attribute in custom-views from http://developer.android.com

原来:

<LinearLayout

    xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:custom="http://schemas.android.com/apk/res/com.example.android.customviews"

    android:orientation="vertical"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    >

<com.example.android.customviews.charting.PieChart

        android:id="@+id/Pie"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:padding="10dp"

        android:layout_weight="100"

        custom:showText="true"

        custom:labelHeight="20dp"

        custom:labelWidth="110dp"

        custom:labelY="85dp"

        custom:labelPosition="left"

        custom:highlightStrength="1.12"

        android:background="@android:color/white"

        custom:pieRotation="0"

        custom:labelColor="@android:color/black"

        custom:autoCenterPointerInSlice="true"

        custom:pointerRadius="4dp"

        />

<Button

        android:id="@+id/Reset"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:text="@string/reset_button"

        />

</LinearLayout>

stackoverflow 对该类问题的讨论

 

你可能感兴趣的:(attribute)