Error generating final archive: Debug certificate expired on  [날짜]


증상 : 이클립스의 Problems에 위와 같은 에러 메시지가 뜨고 프로젝트가 빌드 또는 실행이 되지 않는 경우가 생길때 

원인:  Debug Certificate 가 만료(Certificate 는 만들어진 후 1년이 지나면 Expire 됨)

해결 방법 : 만료된 debug.keystore 파일을 삭제

                파일 위치는 메뉴의 Window > Preferences > Android > Build 내 "Default debug keystore"

                삭제 후 프로젝트 clean



Posted by finewoo
,

이클립스에서 *.properties 파일을 생성하면 기본 인코딩이 ISO-8859-1 형식으로 설정된다.
이는 규약때문이다. *.properties 파일은 원래 ISO-8859-1 로 저장되어야 한다.

따라서 한글 같은 경우에 유니코드 이스케이프 시퀀스를 이용해서 기록해야 한다.
그렇지 않으면 java.util.Properties 객체로 읽어올때 제대로 읽혀지지 않는다. 자바의 Properties 클래스를 이용하는 한
무조건 ISO-8859-1 인코딩으로만 인식하고 읽기 때문에 이문제는 피할 수는 없을것 같다.

모든 작업파일들의 기본 문자인코딩 설정에 대해 확인하고자 하면
이클립스의 Window -> Preferences
Content Types -> Text  트리 메뉴를 확인해 보면 Java, JSP 혹은 JavaScript 등 여러 파일형식을 확인할 수 있다.

위에서 한글같은 경우 유니코드 이스케이프 시퀀스를 이용해야 한다고 했는데
native2ascii 명령으로 iso-8859-1로 변환할 수 있다. 아래와 같은 방식이다.

개발 원본 파일 : example.properties-in 의
example.message       = 잘못된 값을 입력하셨습니다.

native2ascii example.properties-in >example.properties 실행하면

실제 설정 파일 : example.properties
example.message       = \si734\ubaf7 \ub53c\ubwr3\ub678\uc318\ub1b4 \.......................................


위의 방식도 가능하지만 매번 번거로운 작업이므로 실제 개발에서는 사실상 이클립스의 플러그인을 사용한다.
properties 파일 작성시, 변환을 자동으로 해주는 플러그인이 몇가지 있다.
eclipse properties 검색하면 여러 정보를 찾을 수 있을 것이다.

그중에 Propedit(http://propedit.sourceforge.jp/)가 비교적 많이 알려지고 사용되는 파일 인코딩 관련 플러그인이 있다.

- 플러그인 설치(Eclipse Galileo 기준)

1. Eclipse > Help > Install New Software 메뉴 선택
2. Add 클릭 > 주소창에 http://propedit.sourceforge.jp/eclipse/updates/ 를 입력 후 추가.
3. 목록에서 PropertiesEditor를 선택하고 설치.

설치가 완료되고 Properties 파일을 열면 파일탭에 P라는 아이콘이 나타난다.
이제 Properties 파일에 한글을 입력할수가 있게된다.
파일 저장시 자동으로 변환해 주는데 사용자에게는 한글로 변환해서 보여주며. 실제 소스에는 iso-8859형식으로 저장된다.



Posted by finewoo
,

이클립스에서 패키지명이나 클래스 파일을 Refactor시에 경고창에 아래 문구가 포함되는 경우

... class file name must end with .class


에러 메시지와 위의 경고창이 뜨는 경우 해결법

이클립스가 열려있는 경우 먼저 이클립스를 닫는다.
작업디렉토리의 workspace\.metadata\.plugins\org.eclipse.jdt.core 경로로 이동한다.
디렉토리내 모든 *.index 파일과 savedIndexNames.txt 파일을 삭제한다.
이클립스를 재시작 한다.

리팩토링 작업이 정상적으로 이루어진다. --;






Posted by finewoo
,

프로젝트의 버전관리 도구로 CVS 와 Subversion이 가장 많이 사용된다.
하지만 CVS의 단점을 개선한 Subversion이 점차 많이 사용되고 있다.


* subversion의 특징

- 파일명 변경이 히스토리에 남는다.(CVS는 기존 파일을 삭제한 것으로 간주해버린다)
- 원자적 커밋(모든 파일이 커밋되면 되는거고 아니면 모두 롤백)
- 커밋 단위별 버저닝.(CVS는 각 파일별로 버전을 메기지만 SVN은 커밋단위로 버전을 메기기 때문에, 직전 커밋상태로
  모든 파일을 되돌리는 것이 가능하다)


http://subversion.tigris.org/ (subversion 공식 홈페이지)

http://subclipse.tigris.org/ (subclipse 홈페이지)
http://tortoisesvn.sourceforge.net/


이클립스 플러그인 설치 방법

원문 : http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA

 
 
Eclipse 3.2/Callisto, 3.3/Europa, 3.4/Ganymede, 3.5/Galileo +
Subclipse 1.6.5 and 1.4.8 are now available for Eclipse 3.2+!

See the changelog for details. Existing Subclipse users should read the upgrade instructions for important information on changes you to need to make to your Eclipse preferences to see the new version in the update manager.

Subclipse 1.4.x includes and requires Subversion 1.5.x client features and working copy format.

Subclipse 1.6.x includes and requires Subversion 1.6.x client features and working copy format.


Links for 1.6.x Release:
Changelog: http://subclipse.tigris.org/subclipse_1.6.x/changes.html
Eclipse update site URL: http://subclipse.tigris.org/update_1.6.x
Zipped downloads: http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240


 
Install Subclipse in Eclipse 3.x

 

Step 1:

Begin the installation from the Eclipse Help menu item.

Step 2:

This screenshot show the screen as it initially comes up.

In this case you will need to change the radio button to indicate that this is a new install.

Step 3:

This screen will vary depending on the features you have installed already.

You want to click on the New Remote Site button.

If you are behind a proxy and the Eclipse install mechanism does not work, then you can download a zipped version of the update site and then click the New Local Site button instead.

Step 4:

This screen is showing the New Remote Site dialog, filled in with the correct information to install Subclipse

    Name: Subclipse 1.6.x (Eclipse 3.2+)
    URL:  http://subclipse.tigris.org/update_1.6.x
    Name: Subclipse 1.4.x (Eclipse 3.2+)
    URL:  http://subclipse.tigris.org/update_1.4.x
    Name: Subclipse 1.2.x (Eclipse 3.2+)
    URL:  http://subclipse.tigris.org/update_1.2.x
    Name: Subclipse 1.0.x (Eclipse 3.0/3.1)
    URL:  http://subclipse.tigris.org/update_1.0.x

Step 5:
When you first come back to this screen, the site you added will NOT be selected.
Be sure to select it before clicking Next.
Step 6: This next screen shows all of the features that are available to install.
Step 7: Click the button to accept the license agreement.
Step 8: Confirm the install location
Step 9:
There is an Eclipse preference to turn off this next dialog.
I have never seen a signed feature. Not even Eclipse.org nor IBM sign their features.
Step 10: Just a screenshot of the in-process installation.
Step 11: Eclipse needs to be restarted after installing Subclipse.
Step 12:
Finally, after restarting Eclipse,
the first thing you will typically want to do is open the Subclipse Repository perspective
where you can define your repositories.
Be sure to also check the online help
as well as the Subclipse preferences located under Team -> SVN.




..

Posted by finewoo
,