[Flutter] 프로젝트 패키지명 변경하기

https://pub.dev/packages/rename

패키지명 변경하는 패키지 다운

pub global activate rename

변경 및 사용 방법

pub global run rename --bundleId [원하는 패키지] --target [타겟]

// 예시     
pub global run rename --bundleId com.example.android.app --target android

Android

/app/src/debug/AndroidManifest.xml
/app/src/main/AndroidManifest.xml
/app/src/profile/AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="여기부분 변경">
    <!-- Flutter needs it to communicate with the running application
         to allow setting breakpoints, to provide hot reload, etc.
    -->
    <uses-permission android:name="android.permission.INTERNET"/>
</manifest>

/app/src/main/java/[전 패키지명]/MainActivity.java

package 여기부분 변경;

import io.flutter.embedding.android.FlutterActivity;

public class MainActivity extends FlutterActivity {
}

IOS

Info.plist CFBundleIdentifier 키 부분 변경

<key>CFBundleIdentifier</key>

또는

Xcode 안에서 변경하기

답글 남기기

이메일 주소는 공개되지 않습니다.