简体   繁体   English

在takwolf布局中找不到资源标识符

[英]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:nodeOnSrcapp: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.

相关问题 在包Android Layout中找不到属性“”的资源标识符 - No resource identifier found for attribute '' in package Android Layout 找不到扩展的通知布局属性&#39;找不到属性的资源标识符&#39; - Expanded notification layout attributes can not be found 'No resource identifier found for attribute' 在包“android”中找不到属性“layout_columnWeight”的资源标识符 - No resource identifier found for attribute 'layout_columnWeight' in package 'android' 在android AOSP 4.4.2中找不到属性layout_childtype的资源标识符 - No resource identifier found for attribute layout_childtype in android AOSP 4.4.2 错误:在包“ android”中找不到属性“ layout_width”的资源标识符:( - error : no resource identifier found for attribute 'layout_width' in package 'android' :( 在包中找不到属性“layout_constraintLeft_toLeftOf”的资源标识符 - No resource identifier found for attribute 'layout_constraintLeft_toLeftOf' in package 在包“ android”中找不到属性“ Layout_below”的资源标识符 - No resource identifier found for attribute 'Layout_below' in package 'android' 在包中找不到属性“layout_behavior”的资源标识符 - No resource identifier found for attribute 'layout_behavior' in package 在包“ android”中找不到属性“ layout_alignParentCenter”的资源标识符 - No resource identifier found for attribute 'layout_alignParentCenter' in package 'android' 类型错误:在包中找不到属性“ layout_alignparentleft”的资源标识符 - Type error: No resource identifier found for attribute 'layout_alignparentleft' in package
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM