게시판 즐겨찾기
편집
드래그 앤 드롭으로
즐겨찾기 아이콘 위치 수정이 가능합니다.
[android/안드로이드]Corresponding method에러...
게시물ID : programmer_14219짧은주소 복사하기
작성자 : 계란치즈덮밥
추천 : 0
조회수 : 3155회
댓글수 : 2개
등록시간 : 2015/11/02 04:47:49
옵션
  • 본인삭제금지
안녕하세요 이제 삐약삐약대는 학생입니다
다름아니라 제가 안드로이드 그림판앱을 하나 개발하고 있는데 막히는 부분이 있어서요....
제목과 같이 corresponding method로 시작되는 에러입니다.

Corresponding method handler 'public void paintClicked(android.view.View)' not found

Issue: Ensures that onClick attribute values refer to real methods
Id: OnClick

The onClick attribute value should be the name of a method in this View's context to invoke when the view is clicked. This name must correspond to a public method that takes exactly one parameter of type View.

Must be a string value, using '\;' to escape characters such as '\n' or '\uxxxx' for a unicode character.

에러메세지입니다.
대충보면 부합된는 메소드 핸들러가 없다는것 같은데 구글링을 해도 모르겠어여......
stack overflow라는 영문 사이트에서는

The solution is to get rid of the string resource and to put the method name in the android:onClickattribute directly.

이라고 스트링 리소스를 제거하고 android:onclick의 메소드 이름을 뭐 어찌 붙여라? 이런말인거 같은데 스트링 리소스를 어찌 만져야 할지, 어떻게 수정을 해야할지 전혀 감이 안잡여요.....


 엑티비티_메인.xml파일의 빨간부분에 에러가 뜹니다.
이건 그림판아래에 색을 클릭해서 바꿀수있게 만든 코드인데 얘를 통째로 지워야 할까요??8ㅅ8
<ImageButton
   android:layout_width="@dimen/large_brush"
   android:layout_height="@dimen/large_brush"
   android:layout_margin="2dp"
   android:background="#FF000000"
   android:contentDescription="@string/paint"
   android:onClick="paintClicked"
   android:src="@drawable/paint"
   android:tag="#FF000000" />

부디 도와주시면 정말 감사하겠습니다.....ㅠㅠ
전체 추천리스트 보기
새로운 댓글이 없습니다.
새로운 댓글 확인하기
글쓰기
◀뒤로가기
PC버전
맨위로▲
공지 운영 자료창고 청소년보호