I can't capitalize the application name in the terminal
Discussed in https://github.com/flet-dev/flet/discussions/3567
Originally posted by Legolaz7 June 28, 2024 I can’t enter a capital letter in the application name) Although it worked before
If you write the name in another language, an error also appears, but before everything worked)
Has anyone encountered this? How to solve? Works only if written in small letters and in English
(.venv) PS C:\Users\Admin\PycharmProjects\pythonProject> flet build apk --project "Мой бонус"
[21:39:45] Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref 0.23.2 ✅
Customized app icons and splash images ✅
[21:39:46] Error on line 1, column 1 of pubspec.yaml: Missing the required "name" field.
╷
1 │ ┌ dependencies:
2 │ │ cupertino_icons: ^1.0.6
3 │ │ flet: ^0.23.2
4 │ │ flutter:
5 │ │ sdk: flutter
6 │ │ path: ^1.9.0
7 │ │ serious_python: ^0.7.1
8 │ │ url_strategy: ^0.2.0
9 │ │ dependency_overrides:
10 │ │ package_info_plus: ^8.0.0
11 │ │ wakelock_plus: ^1.2.5
12 │ │ description: null
13 │ │ dev_dependencies:
14 │ │ flutter_launcher_icons: ^0.13.1
15 │ │ flutter_lints: ^2.0.0
16 │ │ flutter_native_splash: ^2.3.6
17 │ │ environment:
18 │ │ sdk: '>=3.1.5 <4.0.0'
19 │ │ flutter:
20 │ │ assets:
21 │ │ - app/app.zip
22 │ │ - app/app.zip.hash
23 │ │ uses-material-design: true
24 │ │ flutter_launcher_icons:
25 │ │ android: true
26 │ │ image_path: images/icon.jpg
27 │ │ image_path_android: images/icon.jpg
28 │ │ image_path_ios: images/icon.jpg
29 │ │ ios: true
30 │ │ macos:
31 │ │ generate: true
32 │ │ image_path: images/icon.jpg
33 │ │ remove_alpha_ios: true
34 │ │ web:
35 │ │ generate: true
36 │ │ image_path: images/icon.jpg
37 │ │ windows:
38 │ │ generate: true
39 │ │ icon_size: 256
40 │ │ image_path: images/icon.jpg
41 │ │ flutter_native_splash:
42 │ │ android: true
43 │ │ android_12:
44 │ │ color: '#ffffff'
45 │ │ color_dark: '#333333'
46 │ │ image: images/icon.jpg
47 │ │ image_dark: images/icon.jpg
48 │ │ color: '#ffffff'
49 │ │ color_dark: '#222222'
50 │ │ image: images/icon.jpg
51 │ │ image_android: images/icon.jpg
52 │ │ image_dark: images/icon.jpg
53 │ │ image_dark_android: images/icon.jpg
54 │ │ image_dark_ios: images/icon.jpg
55 │ │ image_dark_web: images/icon.jpg
56 │ │ image_ios: images/icon.jpg
57 │ │ image_web: images/icon.jpg
58 │ │ ios: true
59 │ │ web: true
60 │ │ name: null
61 │ │ publish_to: none
62 │ └ version: 1.0.0+1
╵
Has anyone encountered this? The error is still present
Has been fixed in the attached PR which is to be reviewed. Will be part of a future release. Please be patient.
Issue has been fixed.
Give it a try by installing the latest Flet prerelease: pip install flet --pre (https://pypi.org/project/flet/#history)
Report if the issue persists.
@ndonkoHenri Specifically, the error persists for me)
Please provide more info. The error message you receive, the command you run, the prerelease version you use.
(.venv) PS C:\Users\Admin\PycharmProjects\pythonProject> flet --version
0.23.2
(.venv) PS C:\Users\Admin\PycharmProjects\pythonProject> flet build apk --project "Test"
[21:45:28] Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref 0.23.2 ✅
Customized app icons and splash images ✅
[21:45:34] Generated app icons ✅
[21:45:37] Generated splash screens ✅
[21:46:20] Flet app package app/app.zip was not created.
if you write in Russian, you get an error
(.venv) PS C:\Users\Admin\PycharmProjects\pythonProject> flet build apk --project "Тест"
[21:46:48] Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref 0.23.2 ✅
Customized app icons and splash images ✅
Error on line 1, column 1 of pubspec.yaml: Missing the required "name" field.
╷
1 │ ┌ dependencies:
2 │ │ cupertino_icons: ^1.0.6
3 │ │ flet: ^0.23.2
4 │ │ flutter:
5 │ │ sdk: flutter
6 │ │ path: ^1.9.0
7 │ │ serious_python: ^0.7.1
8 │ │ url_strategy: ^0.2.0
9 │ │ dependency_overrides:
10 │ │ package_info_plus: ^8.0.0
11 │ │ wakelock_plus: ^1.2.5
12 │ │ description: null
13 │ │ dev_dependencies:
14 │ │ flutter_launcher_icons: ^0.13.1
15 │ │ flutter_lints: ^2.0.0
16 │ │ flutter_native_splash: ^2.3.6
17 │ │ environment:
18 │ │ sdk: '>=3.1.5 <4.0.0'
19 │ │ flutter:
20 │ │ assets:
21 │ │ - app/app.zip
22 │ │ - app/app.zip.hash
23 │ │ uses-material-design: true
24 │ │ flutter_launcher_icons:
25 │ │ android: true
26 │ │ image_path: images/icon.jpg
27 │ │ image_path_android: images/icon.jpg
28 │ │ image_path_ios: images/icon.jpg
29 │ │ ios: true
30 │ │ macos:
31 │ │ generate: true
32 │ │ image_path: images/icon.jpg
33 │ │ remove_alpha_ios: true
34 │ │ web:
35 │ │ generate: true
36 │ │ image_path: images/icon.jpg
37 │ │ windows:
38 │ │ generate: true
39 │ │ icon_size: 256
40 │ │ image_path: images/icon.jpg
41 │ │ flutter_native_splash:
42 │ │ android: true
43 │ │ android_12:
44 │ │ color: '#ffffff'
45 │ │ color_dark: '#333333'
46 │ │ image: images/icon.jpg
47 │ │ image_dark: images/icon.jpg
48 │ │ color: '#ffffff'
49 │ │ color_dark: '#222222'
50 │ │ image: images/icon.jpg
51 │ │ image_android: images/icon.jpg
52 │ │ image_dark: images/icon.jpg
53 │ │ image_dark_android: images/icon.jpg
54 │ │ image_dark_ios: images/icon.jpg
55 │ │ image_dark_web: images/icon.jpg
56 │ │ image_ios: images/icon.jpg
57 │ │ image_web: images/icon.jpg
58 │ │ ios: true
59 │ │ web: true
60 │ │ name: null
61 │ │ publish_to: none
62 │ └ version: 1.0.0+1
╵
[21:46:49] Error building Flet app - see the log of failed command above.
Just for fun, I created a new project, but in it the version became different
(.venv) PS C:\Users\Admin\PycharmProjects\pythonProject2> flet --version
0.24.0.dev3174
Yep, try with that version. Thats a prerelease, and thats were the issue is fixed.
This command worked in the new project
(.venv) PS C:\Users\Admin\PycharmProjects\pythonProject2> flet build apk --project "Test"
[21:51:17] Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref 0.24.0 ✅
Customized app icons and splash images ✅
[21:51:23] Generated app icons ✅
[21:51:26] Generated splash screens ✅
[21:52:02] Packaged Python app ✅
[21:53:34] Built .apk for Android ✅
Copied build to build\apk directory ✅
[21:53:39] Successfully built your .apk for Android! 🥳 Find it in build\apk directory. 📂
@ndonkoHenri Tell me, will titles in Russian be supported or only in English?
Because this command didn't work (
(.venv) PS C:\Users\Admin\PycharmProjects\pythonProject2> flet build apk --project "Тест"
[21:54:40] Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref 0.24.0 ✅
Customized app icons and splash images ✅
Error on line 1, column 1 of pubspec.yaml: Missing the required "name" field.
╷
1 │ ┌ dependencies:
2 │ │ cupertino_icons: ^1.0.6
3 │ │ flet: ^0.23.1
4 │ │ flutter:
5 │ │ sdk: flutter
6 │ │ path: ^1.9.0
7 │ │ serious_python: ^0.7.1
8 │ │ url_strategy: ^0.2.0
9 │ │ dependency_overrides:
10 │ │ package_info_plus: ^8.0.0
11 │ │ wakelock_plus: ^1.2.5
12 │ │ description: null
13 │ │ dev_dependencies:
14 │ │ flutter_launcher_icons: ^0.13.1
15 │ │ flutter_lints: ^2.0.0
16 │ │ flutter_native_splash: ^2.3.6
17 │ │ environment:
18 │ │ sdk: '>=3.1.5 <4.0.0'
19 │ │ flutter:
20 │ │ assets:
21 │ │ - app/app.zip
22 │ │ - app/app.zip.hash
23 │ │ uses-material-design: true
24 │ │ flutter_launcher_icons:
25 │ │ android: true
26 │ │ image_path: images/icon.png
27 │ │ image_path_android: images/icon.png
28 │ │ image_path_ios: images/icon.png
29 │ │ ios: true
30 │ │ macos:
31 │ │ generate: true
32 │ │ image_path: images/icon.png
33 │ │ remove_alpha_ios: true
34 │ │ web:
35 │ │ generate: true
36 │ │ image_path: images/icon.png
37 │ │ windows:
38 │ │ generate: true
39 │ │ icon_size: 256
40 │ │ image_path: images/icon.png
41 │ │ flutter_native_splash:
42 │ │ android: true
43 │ │ android_12:
44 │ │ color: '#ffffff'
45 │ │ color_dark: '#333333'
46 │ │ image: images/icon.png
47 │ │ image_dark: images/icon.png
48 │ │ color: '#ffffff'
49 │ │ color_dark: '#222222'
50 │ │ image: images/icon.png
51 │ │ image_android: images/icon.png
52 │ │ image_dark: images/icon.png
53 │ │ image_dark_android: images/icon.png
54 │ │ image_dark_ios: images/icon.png
55 │ │ image_dark_web: images/icon.png
56 │ │ image_ios: images/icon.png
57 │ │ image_web: images/icon.png
58 │ │ ios: true
59 │ │ web: true
60 │ │ name: null
61 │ │ publish_to: none
62 │ └ version: 1.0.0+1
╵
[21:54:41] Error building Flet app - see the log of failed command above.
Here is the documentation of the --project: https://dart.dev/tools/pub/pubspec#name
@ndonkoHenri I wrote the command like this:
flet build apk --project "My test"
flet build apk --project "My_test"
but my application on Android is still called like this "My_test" or "my_test" How can I make it so that on the phone it is simply called "My test"? There were no such problems before, I could call it whatever I wanted and everything worked(
Use --product for that.
Hurray) everything worked as before)
Sorry again for that...