본문 바로가기

[android] dex index google play service 추가 시 dex index 초과 오류[2014-06-03 16:56:23 - Dex Loader] Unable to execute dex: Cannot merge new index 66570 into a non-jumbo instruction![2014-06-03 16:56:23 - TestApplication] Conversion to Dalvik format failed: Unable to execute dex: Cannot merge new index 66570 into a non-jumbo instruction! compile 시 dex table의 갯수가 2^16(65536)개 인데, 초과하면 dex loader에서 오류 발생. indexoverflow와 같은.. 더보기
[android] 한줄 팁 1. TextView 의 말줄임 위치 설정android:ellipsize="end"end / middle / start / none / marquee 2. 2.3 이하에서 dialog가 배경 테두리를 가질 경우 삭제dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT)); 3. bitmap recycle 시 유의사항 (14.06.13)bitmap을 recyle했다면 모든 참조를 끊어라.imageView 참조bitmap 전달인자 4. 서로다른 Notification은 서로다른 context를 써라.같은 context로 다른 Notification을 생성한다면 처음에 생성한 notificatio.. 더보기
[android] get resource id by String 내장된 resource를 가져오려면 약속된 key로 가져오게 된다. 가장 보편적으로 쓰는것이 파일이름이 image.jpg인 drawable에 대해 ImageView.setImageResource(R.drawable.image); 하지만 key를 모를경우, String으로 해당 resource를 찾아올 수 있다. private static Drawable getResource(String resName, Context context) throws NameNotFoundException { Context resContext = context.createPackageContext(context.getPackageName(), 0); Resources res = resContext.getResources(); .. 더보기