2014-08-27 91 views
-1
<Button 
    android:id="@+id/button2" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignLeft="@+id/button1" 
    android:layout_alignRight="@+id/button1" 
    android:layout_below="@+id/button1" 
    android:layout_marginTop="23dp" 
    android:text="Press me" 
    android:onCLick_2="onClick_2" 

    /> 

我在Android应用程序中创建了一个按钮。打印输出为 “在android中的属性onClick_2上找不到资源标识符”。资源标识符错误

有人可以帮我吗?

也可以有人告诉最后两行代码推断(/>独占)?

+0

你应该使用android:onClick – Aashir 2014-08-27 16:03:27

回答

1

属性名称应该是而不是android:onCLick_2

/之前>自行终止一个XML标记,因此您不需要分别地</Button>

+0

我已经做了更正,但错误仍然存​​在... – 2014-08-27 16:07:59