본문 바로가기

이클립스 The selection cannot be launched and there are no recent launches 이클립스 Mars 버전을 설치하고 참고용 안드로이드 소스 코드를 run 시켰는데 The selection cannot be launched and there are no recent launches 팝업 상자가 발생했다. 한동안 당황했는데 기본 실행 모드가 문제였다. 해결 방법: 메뉴 창에서 1. Window - > Preferecences 클릭 2. Run/Debug -> Launching 란을 보면 Launch Operation 항목이 있다. Launch the selected resource or active editor. if not launchable: 항목의 라디오 그룹에서 --> Launch the associated project 를 선택해 준다. 관련된 프로젝트를 시작 시킨다는 의미이고,.. 더보기
Fragment onAttach(Activity activity) deprecated 해결 onAttach (Activity activity) It's now:onAttach (Context context) As my app uses the activity passed before deprecation, a possible solution i think is:이전 코드@Override public void onAttach(Activity activity) { super.onAttach(activity); mActivity = (FragmentActivity) activity; } deprecated 해결 코드@Override public void onAttach(Context context) { super.onAttach(context); mActivity = getActivity(); } 더보기
안드로이드 Context 개념 정리 안드로이드 Context에 대해서 구글링 해보면 참 더럽게 알아듣기 힘들다. 그래서 내 방식으로 이해한 Context에 대해 정리해 봅니다. 이 글은 public 저작권으로 상업적 이용, 인용 등 아무 제한 없이 어디서든 가져다 쓰셔도 됩니다. by sharpen 안드로이드 개발을 하다보면 아래 코드 처럼 public MultiCheckBox(Context context) { 같은 소스코드를 자주 볼 수 있죠.. 그런데 기본서에는 context가 뭔지 설명 안하고 간단하게 넘어가서... 자바를 공부하고 온 사람들도 이해 안가는 상태로 쓰게 됩니다.public class MultiCheckBox extends LinearLayout { private CheckBox checkBox; private Chec.. 더보기
Error:(16, 0) Gradle DSL method not found: 'runProguard()' Error:(16, 0) Gradle DSL method not found: 'runProguard()' Possible causes:The project 'Chapter05' may be using a version of Gradle that does not contain the method.Gradle settingsThe build file may be missing a Gradle plugin.Apply Gradle plugin 이 에러 메시지는 안드로이드 난독화 프로그램 중에 Proguard의 변경이 생겨서 발생하는 에러이다.안드로이드 스튜디오 툴의 버전이 올라가면서 변경된 사항이기 때문에 간혹 이런 사소한 에러로 고생하는 경우가 생긴다. 안드로이드 스튜디오는 프로젝트 안에 모듈이라는 단위로 구.. 더보기
손에 잡히는 정규표현식 표 펌 http://m.blog.daum.net/creazier/15309380# - 참조 : 손에 잡히는 정규 표현식 관련 문법 내용 기 호 의 미 기본 메타 문자 . 모든 문자와 일치 (한 문자) |(버티컬 바) 왼쪽 혹은 오른쪽과 일치 [^] 문자 집합 구성원 중 하나와 일치 - 문자 집합 구성원을 제외하고 일치 \ 다음에 오는 문자를 이스케이프 수량자 * 문자가 없는 경우나 하나 이상 연속하는 문자 찾기 *? 게으른 * 문자 + 문자 하나 이상 찾기 +? 게으른 + 문자 ? 문자가 없거나 하나인 문자 찾기 {n} 정확히 요소와 n번 일치 {m, n} 요소와 m에서 n번 일치 {n, } 요소와 n번 이상 일치 {n, }? 게으른 {n, } 위치 지정 ^ 문자열의 시작과 일치 \A 문자열의 시작과 일치 .. 더보기