Я работаю над значительным проектом Flutter для мобильных устройств (геолокация, база данных, веб-коммуникация, использование камеры), и я испытываю следующую проблему:
Когда приложение впервые установлено (как отладки, так и версии выпуска были испытаны для этого), экраны запуска отображается на величину 2-3 секунды и начинается приложение. Однако, если приложение выключено или телефон перезагрузился, включение приложения снова генерирует время ожидания около 50 секунд на экране запуска.
Эта проблема присутствует только на устройствах Android, время загрузки версии iOS не меняется. < /P>
может быть вызвано некоторыми библиотеками? Или неправильная реализация экрана запуска? < /P>
Вот мой pubspec.yaml < /p>
name: flutter_app
description: A new Flutter application.
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/arc ... nKeys.html
version: 4.369.010+4369010
environment:
sdk: ">=2.17.0 =3.10.0"
dependencies:
flutter:
sdk: flutter
camera: ^0.10.5+2
path_provider: ^2.0.15
path: ^1.8.3
flutter_riverpod: ^2.1.3
flutter_localizations:
sdk: flutter
#lifted to 0.18.0 for flutter_audit
intl: ^0.18.0
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.4
sqflite: ^2.0.0+4
#password: 1.0.0
http: ^0.13.4
http_parser: ^4.0.2
#combos: ^1.2.0
fluttertoast: ^8.0.4
signature: ^5.3.0
flutter_image_compress: ^1.1.0
syncfusion_flutter_signaturepad: ^20.3.57
#device_info: ^2.0.3
#flutter_ip: ^0.2.0
flutter_launcher_icons: ^0.11.0
package_info_plus: ^4.0.1
shared_preferences: ^2.0.15
package_info_plus_web: ^2.0.0
crypto: ^3.0.2
# url_launcher: ^6.0.9
detect_fake_location: ^1.0.1
camera_android: ^0.10.8+3
safe_device: ^1.1.4
# geolocator: ^8.2.1
geolocator: ^10.1.0
permission_handler: ^11.0.1
# 10.4.3
device_info_plus: ^9.0.3
image: ^3.3.0
carousel_slider: ^4.2.1
sensors: ^2.0.3
vector_math: any
motion_sensors: ^0.1.0
google_mlkit_text_recognition: ^0.10.0
url_launcher: '6.0.0'
restart_app: ^1.2.1
dart_ipify: ^1.1.1
image_compression: ^1.0.3
native_shutter_sound: ^0.0.1
flutter_icons:
android: "launcher_icon"
ios: true
image_path: assets\images\launcher.png
dev_dependencies:
flutter_lints: ^2.0.1
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pubpubspec
# The following section is specific to Flutter.
flutter:
generate: true
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
assets:
- assets/logo.png
- assets/config/
- assets/images/
- assets/demo/tmp_app4748.json
- assets/demo/tmp_app4716.json
- assets/demo/tmp_app4717.json
- assets/demo/tmp_app4748eng.json
fonts:
- family: Montserrat
fonts:
- asset: fonts/Montserrat-Regular.ttf
< /code>
Это было протестировано на 3 разных телефонах Android и не наблюдается на iOS-One, так что это проблема только для Android, но я не уверен, что делать дальше. Библиотеки, по -видимому, наиболее вероятны для меня в качестве причины - возможно, некоторые из них обновляются на начале второго приложения, и это вызывает проблему? Как проверить это? Кто -нибудь из вас сталкивался с аналогичными проблемами стартапа раньше?
Подробнее здесь: https://stackoverflow.com/questions/781 ... -first-one
Flutter Android последовательный приложение стартапы намного медленнее, чем первое ⇐ Android
Форум для тех, кто программирует под Android
1751492124
Anonymous
Я работаю над значительным проектом Flutter для мобильных устройств (геолокация, база данных, веб-коммуникация, использование камеры), и я испытываю следующую проблему:
Когда приложение впервые установлено (как отладки, так и версии выпуска были испытаны для этого), экраны запуска отображается на величину 2-3 секунды и начинается приложение. Однако, если приложение выключено или телефон перезагрузился, включение приложения снова генерирует время ожидания около 50 секунд на экране запуска.
Эта проблема присутствует только на устройствах Android, время загрузки версии iOS не меняется. < /P>
может быть вызвано некоторыми библиотеками? Или неправильная реализация экрана запуска? < /P>
Вот мой pubspec.yaml < /p>
name: flutter_app
description: A new Flutter application.
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 4.369.010+4369010
environment:
sdk: ">=2.17.0 =3.10.0"
dependencies:
flutter:
sdk: flutter
camera: ^0.10.5+2
path_provider: ^2.0.15
path: ^1.8.3
flutter_riverpod: ^2.1.3
flutter_localizations:
sdk: flutter
#lifted to 0.18.0 for flutter_audit
intl: ^0.18.0
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.4
sqflite: ^2.0.0+4
#password: 1.0.0
http: ^0.13.4
http_parser: ^4.0.2
#combos: ^1.2.0
fluttertoast: ^8.0.4
signature: ^5.3.0
flutter_image_compress: ^1.1.0
syncfusion_flutter_signaturepad: ^20.3.57
#device_info: ^2.0.3
#flutter_ip: ^0.2.0
flutter_launcher_icons: ^0.11.0
package_info_plus: ^4.0.1
shared_preferences: ^2.0.15
package_info_plus_web: ^2.0.0
crypto: ^3.0.2
# url_launcher: ^6.0.9
detect_fake_location: ^1.0.1
camera_android: ^0.10.8+3
safe_device: ^1.1.4
# geolocator: ^8.2.1
geolocator: ^10.1.0
permission_handler: ^11.0.1
# 10.4.3
device_info_plus: ^9.0.3
image: ^3.3.0
carousel_slider: ^4.2.1
sensors: ^2.0.3
vector_math: any
motion_sensors: ^0.1.0
google_mlkit_text_recognition: ^0.10.0
url_launcher: '6.0.0'
restart_app: ^1.2.1
dart_ipify: ^1.1.1
image_compression: ^1.0.3
native_shutter_sound: ^0.0.1
flutter_icons:
android: "launcher_icon"
ios: true
image_path: assets\images\launcher.png
dev_dependencies:
flutter_lints: ^2.0.1
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pubpubspec
# The following section is specific to Flutter.
flutter:
generate: true
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
assets:
- assets/logo.png
- assets/config/
- assets/images/
- assets/demo/tmp_app4748.json
- assets/demo/tmp_app4716.json
- assets/demo/tmp_app4717.json
- assets/demo/tmp_app4748eng.json
fonts:
- family: Montserrat
fonts:
- asset: fonts/Montserrat-Regular.ttf
< /code>
Это было протестировано на 3 разных телефонах Android и не наблюдается на iOS-One, так что это проблема только для Android, но я не уверен, что делать дальше. Библиотеки, по -видимому, наиболее вероятны для меня в качестве причины - возможно, некоторые из них обновляются на начале второго приложения, и это вызывает проблему? Как проверить это? Кто -нибудь из вас сталкивался с аналогичными проблемами стартапа раньше?
Подробнее здесь: [url]https://stackoverflow.com/questions/78185699/flutter-android-consecutive-app-startups-much-slower-than-the-first-one[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия