Flutter로 앱 표시명 빌드를 변경하려면 어떻게 해야 하나요?
Flutter create test app을 사용하여 앱을 만들었습니다.이제 앱 이름을 "testapp"에서 "My Trips Tracker"로 변경하고 싶습니다.내가 어떻게 그럴 수 있을까?
는 금까 the the the the the the the the the the the에서 변화를 시도했다.AndroidManifest.xml
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★?
안드로이드
.AndroidManifest.xml
:android/app/src/main
)
<application
android:label="App Name" ...> // Your app name here
iOS
.info.plist
:ios/Runner
)
<key>CFBundleDisplayName</key>
<string>App Name</string> // Your app name here
및/또는
앱을 정지하고 다시 실행하는 것을 잊지 마세요.
업데이트: 코멘트를 보니 이 답변은 오래된 것 같습니다.
Flutter 문서에는 Android와 iOS 모두에서 응용 프로그램의 표시 이름을 변경할 수 있는 위치가 나와 있습니다.이것은, 고객이 찾고 있는 것이기도 합니다.
Android용
이 은 '아까부터'에 있는 것 .AndroidManifest.xml
처 application
작성하다
/android/app/src/main/에 있는 기본 App Manifest.xml 파일을 검토하고 특히 값이 올바른지 확인합니다.
응용 프로그램:응용 프로그램 태그의 Android: 라벨을 편집하여 응용 프로그램의 최종 이름을 반영합니다.
iOS용
「 」를 .Review Xcode project settings
★★★★
Xcode에서 대상 설정으로 이동합니다.
Xcode에서 앱의 ios 폴더에서 Runner.xcworkspace를 엽니다.
앱 설정을 보려면 Xcode 프로젝트 탐색기에서 Runner 프로젝트를 선택하십시오.그런 다음 기본 보기 사이드바에서 Runner 대상을 선택합니다.
General 탭을 선택합니다.다음으로 가장 중요한 설정을 확인합니다.
표시명: 홈 스크린 등에 표시되는 앱의 이름입니다.
flatter_launcher_name이라는 플러그인이 있습니다.
pubspec.yaml 파일 쓰기:
dev_dependencies:
flutter_launcher_name: "^0.0.1"
flutter_launcher_name:
name: "yourNewAppLauncherName"
실행:
flutter pub get
flutter pub run flutter_launcher_name:main
하는 것과 수 .AndroidManifest.xml
★★★★★★★★★★★★★★★★★」Info.plist
.
/ios Project/ios/Runner/info.plist를 하여 Xcode를 않고 할 수 .<key>CFBundleDisplayName</key>
[String] [ [ [ [ [ [ [ [.
FWIW - Xcode와 Flutter의 변경에 짜증이 나서 Xcode를 열기 전에 모든 변경을 커밋하기 시작했기 때문에 Flutter 프로젝트의 변경 내용을 확인할 수 있었습니다.
기본 앱 매니페스트 파일을 검토합니다.
AndroidManifest.xml
<app dir>/android/app/src/main
android:label
몇 가지 가능성이 있습니다.
1- 패키지의 용도:
Flutter 앱의 런처 이름을 업데이트하는 작업을 단순화하는 명령줄 툴 때문에 flatter_launcher_name을 사용하는 것이 좋습니다.
사용방법:
플래터 런처 이름 설정을 pubspec.yaml 파일에 추가합니다.
dev_dependencies:
flutter_launcher_name: "^0.0.1"
flutter_launcher_name:
name: "yourNewAppLauncherName"
구성을 설정한 후 남은 작업은 패키지를 실행하는 것뿐입니다.
flutter pub get
flutter pub run flutter_launcher_name:main
이 패키지를 사용하는 경우 AndroidManifest.xml 또는 Info.plist 파일을 수정할 필요가 없습니다.
- 편집 2 - 편집 2AndroidManifest.xml
및 »info.plist
†
Android의 경우 편집 전용 android:label
AndroidManifest.xml 파일의 응용 프로그램 태그 값:android/app/src/main
코드:
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:name="io.flutter.app.FlutterApplication"
android:label="Your Application Name" //here
android:icon="@mipmap/ic_launcher">
<activity>
<!-- -->
</activity>
</application>
</manifest>
스크린샷:
iOS의 경우 폴더에 있는 Info.plist 파일의 String 태그 내부 값만 편집합니다.ios/Runner
.
코드:
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>Your Application Name </string> //here
</dict>
</plist>
스크린샷:
해요.flutter clean
문제가 있는 경우는, 애플리케이션을 재기동합니다.
* project / ios / Runner / info . plist * * * Xcode 를osiOS 에 * * * * 。 ★★<key>CFBundleDisplayName</key>
이치노
Android의 경우 AndroidManifest.xml 파일의 Android/app/src/main 폴더에서 앱 이름을 변경합니다.예를 들어, Android 레이블이 원하는 이름을 나타내도록 합니다.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<application
android:label="test"
// The rest of the code
</application>
</manifest>
에서는, 은, 「 「 」의 「 」의 「 」의 「 」의 「 」의 「 」패키지를 사용하는 을 제안하고 .flutter_launcher_name
, 이 2.0 의존관계
" " "flutter_app_name
(https://pub.dev/packages/flutter_app_name)는 안전성이 뛰어난 거의 동일한 패키지이며 Flutter 2.0에서 작동합니다.
- Dev 종속성 및 앱 이름 설정
dev_dependencies:
flutter_app_name: ^0.1.1
flutter_app_name:
name: "My Cool App"
- 실행합니다.
flutter_app_name
flutter pub get
flutter pub run flutter_app_name
런처 이름이 "My Cool App"로 지정됩니다.
Android와 iOS의 이름을 업데이트하여 응용 프로그램 이름을 변경할 수 있습니다.
Android용
AndroidManifest.xml 파일을 열기만 하면 됩니다.
Inside Android > app > src > main >AndroidManifest.xml
다음과 같습니다.-
어플리케이션명이 '데모'이기 때문에 라벨값을 갱신합니다.
iOS와 마찬가지로 Info.plist 파일을 열기만 하면 됩니다.
inside ios > Runner > Info.plist로 이동합니다.
다음과 같습니다.-
그리고 이 문자열 값을 변경합니다.
한 가지 문제는 iOS Settings(iOS 12.x)에서 Display Name(표시명)을 변경하면 iOS Settings(iOS 설정)의 앱 이름과 아이콘이 이전 버전으로 유지된다는 것입니다.
Android의 경우 Android 폴더에서 앱 이름을 변경합니다.AndroidManifest.xml 파일의 폴더android/app/src/main
, let.android
label은 예를 들어 다음과 같이 원하는 이름을 나타냅니다.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<application
`android:label="myappname"`
// The rest of the code
</application>
</manifest>
이름 변경 패키지로 쉽게 할 수 있습니다. 현재 IOS, Android, macOS 및 웹에서 사용 가능한 다양한 플랫폼에 대한 Flutter 프로젝트의 AppName 및 BundleId를 변경할 수 있습니다.
- 패키지를 설치하려면 다음 명령을 실행합니다.
pub global activate rename
- 앱의 이름을 변경하려면 다음 명령을 사용합니다.
pub global run rename --appname "Your App Name"
바로 그거야!
패키지에는 타깃플랫폼을 선택할 수 있는 몇 가지 기능이 있기 때문에 자세한 내용은 패키지의 매뉴얼을 참조해 주십시오.
확실히 (IOS와 Android로 가는) 매뉴얼 솔루션을 보았습니다.하지만 한 곳에서 이름을 변경할 수 있는 플러그인을 발견했습니다.
https://pub.dev/filename/filename_filename
다음 작업을 수행합니다.에 추가pubspec.yaml
dev_dependencies:
flutter_launcher_name: "^0.0.1"
flutter_launcher_name:
name: "yourNewAppLauncherName"
터미널에서 실행:
flutter pub get
flutter pub run flutter_launcher_name:main
다 했어요.
2019-12-21 현재 이름 변경 필요 [NameOf]pubspec.yaml 파일에 Your App]이 있습니다.그런 다음 Edit → Find → Replace in Path(경로에서 바꾸기) 메뉴로 이동하여 이전 이름의 모든 항목을 바꿉니다.
또한 Android 디렉토리의 폴더 이름(예: Android/app/src/main/java/com/example/yourappname)을 변경하십시오.
그런 다음 콘솔의 앱 루트 디렉터리에서
flutter clean
멀티 로컬라이제이션(멀티 로컬라이제이션)용으로 릴리스 하는 경우.
Android의 경우:
앱 폴더에 [appname]\displays\app\src\main\res 로케일 폴더를 추가합니다.다음은 예를 제시하겠습니다.
가치관
발루젠
그런 다음 각 폴더 안에 해당 언어의 앱 이름을 포함하는 새로운 strings.xml을 추가합니다.
for ar
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="app_name">ادارة الديون</string>
</resources>
en을 위해
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="app_name">debt management</string>
</resources>
마지막으로 AndroidManifest.xml 파일로 이동하여 Android:label을 새로 만든 파일로 설정합니다.
android:label="@string/app_name"
먼저 Android Manifest.xml 파일 이름 변경
android:label="Your App Name"
두 번째 Pubspec.yaml 파일에서 응용 프로그램 이름 변경name: Your Application Name
세 번째 응용 프로그램 로고 변경
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/path/your Application logo.formate"
제4회 실행
flutter pub pub run flutter_launcher_icons:main
나처럼 명령줄에서 작업을 자동화하고 싶다면 이 기능을 사용할 수 있습니다.
appName="TestApp"
declare -a androidAppTypes=(
"main"
"debug"
"profile"
)
# Change app name for Android
for appType in ${androidAppTypes[@]}
do
xmlstarlet ed -L -u '/manifest/application/@android:label' -v "$appName" android/app/src/$appType/AndroidManifest.xml
done
# Change app name for Android
plutil -replace CFBundleDisplayName -string "$appName" ios/Runner/Info.plist
iOS 및 Android의 이름을 변경하는 방법은 설명서에 다음과 같이 명시되어 있습니다.
그러나 iOS의 경우 Xcode에서 Display Name을 변경한 후 Flutter 방식으로 응용 프로그램을 실행할 수 없습니다.flutter run
.
Flutter run은 앱 이름을 Runner로 예상하기 때문입니다.Xcode로 이름을 변경해도 동작하지 않습니다.
그래서 다음과 같이 수정했습니다.
Flutter 프로젝트 위치인 ios/Runner.xcodeproj/project.pbxproj로 이동하여 새 이름의 모든 인스턴스를 검색하여 Runner로 바꿉니다.
모든 이 다 잘 될 예요.flutter run
wayway.disclosed.를 클릭합니다.
그러나 다음 출시 시 이름 표시 이름을 변경하는 것을 잊지 마십시오.그렇지 않으면 앱 스토어가 사용자 이름을 거부합니다.
언급URL : https://stackoverflow.com/questions/49353199/how-can-i-change-the-app-display-name-build-with-flutter
'programing' 카테고리의 다른 글
Git 커밋의 변경 내용을 확인하려면 어떻게 해야 합니까? (0) | 2023.04.10 |
---|---|
asp.net에서 목록 <>을 목록에 추가하는 방법 (0) | 2023.04.10 |
의 줄바꿈으로 문자열을 분할합니다.그물 (0) | 2023.04.10 |
excel 시트를 다중 인덱스 데이터 프레임으로 읽기(pd.read_databrame()) (0) | 2023.04.10 |
std:: wstring VS std:: string (0) | 2023.04.10 |