Флаттер (синхронизация файлов) не заканчивается - PullRequest
0 голосов
/ 26 марта 2020

Процесс создания / синхронизации флаттера c для меня не окончен sh. Он застрял на Syncing files to device Android SDK built for x86....

Проблема возникает с каждым приложением и не связана с самим эмулятором, поскольку даже физическое устройство (Nexus 5X) имеет ту же проблему. В целях сохранения эмулятор был создан с flutter emulators --create --name nexus

Моя главная проблема заключается в невозможности использования инструментов горячей перезагрузки, отладки и других функций. Как я могу дополнительно исследовать / отлаживать?


Только консоль

  • Компиляция и выполнение отлично работает
  • Приложение отзывчиво и операторы печати консоли работают с консолью выход.

врач флаттера -v

[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Linux, locale en_US.UTF-8)
    • Flutter version 1.12.13+hotfix.8 at /home/jannik/devenv/flutter
    • Framework revision 0b8abb4724 (6 weeks ago), 2020-02-11 11:44:36 -0800
    • Engine revision e1e6ced81d
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /home/jannik/devenv/android-sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /home/jannik/devenv/android-sdk
    • ANDROID_SDK_ROOT = /home/jannik/devenv/android-sdk
    • Java binary at: /usr/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_232-solus-ga)
    • All Android licenses accepted.

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)

! Doctor found issues in 1 category.

прогон флаттера

Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider
enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                        11.8s
✓ Built build/app/outputs/apk/debug/app-debug.apk.
D/FlutterView( 4752): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@82cc314
Installing build/app/outputs/apk/app.apk...                         1.7s
D/FlutterActivity( 5134): Using the launch theme as normal theme.
D/FlutterActivityAndFragmentDelegate( 5134): Setting up FlutterEngine.
D/FlutterActivityAndFragmentDelegate( 5134): No preferred FlutterEngine was provided. Creating a new FlutterEngine for this FlutterFragment.
D/FlutterActivityAndFragmentDelegate( 5134): Attaching FlutterEngine to the Activity that owns this Fragment.
D/FlutterView( 5134): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@eb0c503
D/FlutterActivityAndFragmentDelegate( 5134): Executing Dart entrypoint: main, and sending initial route: /
D/FlutterView( 4752): Detaching from a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@82cc314
D/EGL_emulation( 5134): eglMakeCurrent: 0xa6196880: ver 2 0 (tinfo 0xa48618e0)
Syncing files to device Android SDK built for x86...
I/flutter ( 5134): pressed                                      
Syncing files to device Android SDK built for x86...
I/flutter ( 5134): pressed                                      
Syncing files to device Android SDK built for x86...
I/flutter ( 5134): pressed                                      
Syncing files to device Android SDK built for x86...
(This is taking an unexpectedly long time.)       ⣻

прогон флаттера -v

https://gist.github.com/jnnksdev/78c1d2d1b6d86a06d387786c07667918


Код Visual Studio

  • Компиляции выглядят нормально
  • Приложение не отвечает и не показывает (белый холст, ничего больше)

Выполнить> Начать отладку

Launching lib/main.dart on Android SDK built for x86 in debug mode...
✓ Built build/app/outputs/apk/debug/app-debug.apk.
D/FlutterView( 4752): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@82cc314
D/FlutterActivity( 6179): Using the launch theme as normal theme.
D/FlutterActivityAndFragmentDelegate( 6179): Setting up FlutterEngine.
D/FlutterActivityAndFragmentDelegate( 6179): No preferred FlutterEngine was provided. Creating a new FlutterEngine for this FlutterFragment.
D/FlutterActivityAndFragmentDelegate( 6179): Attaching FlutterEngine to the Activity that owns this Fragment.
D/FlutterView( 6179): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@82cc314
D/FlutterActivityAndFragmentDelegate( 6179): Executing Dart entrypoint: main, and sending initial route: /
D/FlutterView( 4752): Detaching from a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@82cc314

Флаттер: запустить Флаттер Доктор

[flutter] flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Linux, locale en_US.UTF-8)
    • Flutter version 1.12.13+hotfix.8 at /home/jannik/devenv/flutter
    • Framework revision 0b8abb4724 (6 weeks ago), 2020-02-11 11:44:36 -0800
    • Engine revision e1e6ced81d
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /home/jannik/devenv/android-sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /home/jannik/devenv/android-sdk
    • ANDROID_SDK_ROOT = /home/jannik/devenv/android-sdk
    • Java binary at: /usr/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_232-solus-ga)
    • All Android licenses accepted.

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)

uname -a

Linux sol 5.5.7-150.current #1 SMP PREEMPT Wed Mar 4 03:31:00 UTC 2020 x86_64 GNU/Linux

1 Ответ

1 голос
/ 29 марта 2020

Я не выяснил , почему процесс синхронизации не заканчивается sh, но решение состоит в том, чтобы переключиться на "более новый" канал флаттера, например, с flutter channel beta.

channel    status

stable     does not work
beta       works
master     works
dev        works
...