2014-04-08 5 views
6

Eclipse에서 Refactor -> Rename을 완료했으며 프로젝트의 이름이 Eclipse에서 성공적으로 변경되었습니다. 그러나 폴더에 복사/붙여 넣기를 할 때 이전 이름은 계속 유지됩니다.Eclipse에서 프로젝트의 이름 변경

어떻게 완전히 이름을 바꿀 수 있습니까?

+0

'폴더에 복사/붙여 넣기 할 때'라는 의미는 무엇입니까? 패키지 이름이 이전 이름이라는 뜻입니까? – nKn

+0

내 앱의 백업 버전을 만들 때 복사하여 내 백업 폴더에 붙여 넣습니다. 프로젝트가 포함 된 폴더 이름은 이전 이름을 유지합니다. – NiVeR

답변

13

프로젝트 폴더에서 .project 파일을 열고 다음 값을 변경하십시오. enter image description here

당신은 그것에서 프로젝트 이름을 변경해야합니다.

또 다른 방법, 프로젝트 탐색기에서

복사 올드 프로젝트, 거기에 그것을 붙여, 그것은 새 이름을 물어 새 이름을주고, 수행됩니다.

+0

이름이 새 이름으로 변경되었지만 폴더는 이전 이름을 유지합니다. – NiVeR

+2

폴더 이름을 변경하지 않았기 때문입니다. 이전 프로젝트를 프로젝트 탐색기에서 복사하여 거기에 붙여 넣으면 새 이름을 물어보고 새 이름을 지정한 다음 완료합니다. – Kedarnath

+0

그랬습니다. 고마워요. – NiVeR

1

1) 패키지 -> 리팩터 -> 이름 바꾸기를 마우스 오른쪽 단추로 클릭하십시오. 참조 업데이트 및 하위 패키지 이름 바꾸기를 선택하십시오. 작동

<string name="app_name">"new_name"</string> 

희망 자원 -> values-> string.xml "NEW_NAME"에 APP_NAME 변경에 AndroidMenifest.xml

package=”com.example.new_package_name” 

3)에서

2) 변경 패키지 이름!

0

복사 및 붙여 넣기 ANDROID PROJECT와 새로운 프로젝트를 만들어냅니다. 다음 단계를 따르십시오 :

A. 이클립스를 사용하는 경우 먼저 복사 할 프로젝트를 엽니 다 (DON "복사 할 프로젝트를 열지 않음), Eclipse 왼쪽의 탐색기 패키지 창에서 Android 프로젝트를 복제 (복사/붙여 넣기)하십시오. 붙여 넣기 할 때 Eclipse에서 새 프로젝트 이름을 묻습니다. 새 프로젝트 이름을 지정하십시오. Eclipse 프로젝트 이름 및 디렉토리 이후 응용 프로그램 이름 및 패키지와 독립적입니다. 다음 단계를 수행하면 패키지 이름을 변경하는 방법이 도움이됩니다 .. 참고 : 두 가지 유형의 패키지 이름이 있습니다 (기본 패키지는 매니페스트 파일 및 하위 패키지 모든 자바 파일)

1. After you get done above step, to change Application package name(main package), follow the following steps: 
    First right click your project 
    Then go to "Android tools" 
    Then select "Rename Application package" 
    Enter a new name in a dialogue window , and hit OK. 
    Then It will show you in which part of your project the Application name will be changed. It will show you that 
    the Application name will be changed in manifest, and in most relevant Java files. Hit "OK" 
    YOU DONE in this part, but make sure you rebuild your project to take effect. 

    To rebuild your project, go to ""project" >>> "Clean" >>>> select a Project from a projects list, and hit "OK" 
    Finaly, you can run your new project. 

2. To change src package(sub package) names of packages within Src folder follow the following steps: 
    First you need to create new package: (src > right click > new > package). 

    Example of creating package: com.myCompany.executable 

    Follow these steps to move the Java files from the old that has already been copied package in part A to your new package. 

    Select the Java files within that old package 
    Right click that java files 
    select "Refactor" option 
    select "Move" option 
    Select your preferred package from the list of packages in a dialogue window. Most probably you need to select the new one you just created and hit "OK" 
관련 문제