[英]no resource identifier found in takwolf layout
I'm getting no resource identifier found for a couple of attributes in the following layout. 我在以下布局中找不到几个属性的资源标识符。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_lock"
android:gravity="center"
android:orientation="vertical">
//image
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_launcher" />
//textview
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="32dp"
android:text="@string/draw_pattern"
android:textSize="20dp"
android:gravity="center"
android:textColor="@color/white" />
//problem seems at the end of this block
<com.takwolf.android.lock9.Lock9View
android:id="@+id/lock_9_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:nodeSrc="@drawable/lock_9_view_node_normal"
app:nodeOnSrc="@drawable/lock_9_view_node_highlighted"
app:lineColor="#ff006699"
app:lineWidth="8dp" />
<hell.sathan.applockmasters.Custom.FlatButton
android:id="@+id/forgetPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Forget Password"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:textSize="12dp"
android:textColor="@color/white"
app:buttonColor="@color/fbutton_color_carrot"
app:cornerRadius="5dp"
app:shadowEnabled="true"
app:shadowHeight="2dp" />
</LinearLayout>
I'm having the errors below : 我有以下错误:
Error:(24) No resource identifier found for attribute 'nodeSrc' in package 错误:(24)在包中找不到属性“nodeSrc”的资源标识符
Error:(24) No resource identifier found for attribute 'nodeOnSrc' in package 错误:(24)在包中找不到属性“nodeOnSrc”的资源标识符
Error:(24) No resource identifier found for attribute 'lineColor' in package 错误:(24)在包中找不到属性“lineColor”的资源标识符
Error:(24) No resource identifier found for attribute 'lineWidth' in package 错误:(24)在包中找不到属性“lineWidth”的资源标识符
您必须在Gradle.app和Sync First中添加依赖项'com.takwolf.android:lock9view:0.0.11'
。
you need to make this 你需要做到这一点
<com.takwolf.android.lock9.Lock9View
android:id="@+id/lock_9_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:lock9_nodeSrc="@drawable/node_normal"
app:lock9_nodeOnSrc="@drawable/node_active"
app:lock9_nodeOnAnim="@anim/node_on_1"
app:lock9_padding="28dp"
app:lock9_spacing="28dp"
app:lock9_lineColor="@color/blue_light"
app:lock9_lineWidth="8dp"
app:lock9_autoLink="false"
app:lock9_enableVibrate="true"
app:lock9_vibrateTime="20" />
your error is you doing this 你的错误是你这样做的
app:**nodeSrc**="@drawable/lock_9_view_node_normal"
but it's like this 但就是这样
app:lock9_nodeSrc="@drawable/lock_9_view_node_normal"
You have to put app:lock9_
instead of app:
. 你必须把app:lock9_
而不是app:
.
Try to replace app:nodeOnSrc
with app:lock9_nodeOnSrc
for example. 尝试更换app:nodeOnSrc
与app:lock9_nodeOnSrc
例如。
In the documentation of the library , you have an example : 在库的文档中 ,您有一个示例:
<com.takwolf.android.lock9.Lock9View
android:id="@+id/lock_9_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:lock9_nodeSrc="@drawable/node_normal"
app:lock9_nodeOnSrc="@drawable/node_active"
app:lock9_nodeOnAnim="@anim/node_on_1"
app:lock9_padding="28dp"
app:lock9_spacing="28dp"
app:lock9_lineColor="@color/blue_light"
app:lock9_lineWidth="8dp"
app:lock9_autoLink="false"
app:lock9_enableVibrate="true"
app:lock9_vibrateTime="20" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.