<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.user.mycmf.MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/shape_list"
android:id="@+id/friend01"
android:tag="001"
android:clickable="true"
android:>"call">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/name01"
android:textSize="15sp"
android:textStyle="bold"
android:textColor="#61380B"
android:gravity="center"
android:background="@drawable/shape_title"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/addr01"
android:textSize="15sp"
android:textColor="#22741C"/>
<TextView
android:id="@+id/tel01"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/tel01"
android:singleLine="true"
android:ellipsize="end"
android:textSize="15sp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/shape_list"
android:id="@+id/friend02"
android:tag="002"
android:clickable="true"
android:>"call">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/name02"
android:textSize="18sp"
android:gravity="center"
android:textStyle="bold"
android:textColor="#61380B"
android:background="@drawable/shape_title"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/addr02"
android:textSize="15sp"
android:textColor="#22741C"/>
<TextView
android:id="@+id/tel02"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/tel02"
android:textSize="15sp"
android:singleLine="true"
android:ellipsize="end" />
</LinearLayout>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.user.mycmf.MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/shape_list"
android:id="@+id/friend01"
android:tag="001"
android:clickable="true"
android:>"call">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/name01"
android:textSize="15sp"
android:textStyle="bold"
android:textColor="#61380B"
android:gravity="center"
android:background="@drawable/shape_title"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/addr01"
android:textSize="15sp"
android:textColor="#22741C"/>
<TextView
android:id="@+id/tel01"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/tel01"
android:singleLine="true"
android:ellipsize="end"
android:textSize="15sp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/shape_list"
android:id="@+id/friend02"
android:tag="002"
android:clickable="true"
android:>"call">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/name02"
android:textSize="18sp"
android:gravity="center"
android:textStyle="bold"
android:textColor="#61380B"
android:background="@drawable/shape_title"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/addr02"
android:textSize="15sp"
android:textColor="#22741C"/>
<TextView
android:id="@+id/tel02"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/tel02"
android:textSize="15sp"
android:singleLine="true"
android:ellipsize="end" />
</LinearLayout>
</LinearLayout>
뭐가 문제일 까요 ㅜㅜ 교재 보고서 따라하는데..
tag 001을 01로
java.lang.IllegalStateException: Could not execute method for android:onClick at android.view.View$DeclaredOnClickListener.onClick(View.java:4698)/Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at android.view.View$DeclaredOnClickListener.onClick(View.java:4693) 바꿔바도 계속뜹미다ㅜㅜ
혹시 이게 왜 뜨는건지 간단하게 설명좀 해주실 수 있을까용..
나도 책쓴놈이 왜 이따구로 했는지 알수가 없네
식별자를 못찾아서 그런건데 tag가 001이고 string은 tel01이라서 불일치인줄알았냐ㅏ니
그리고 에러는 다올려야지 중간에 짤리면 소용없음
감사합니다 식별자문제인가용.. string이랑 레이아웃 번호/태그만 일치하면 되는거지요? 다 같은거같은데 안되네요 후ㅜㅜㅜ