You are on page 1of 19

11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter

vibração / vibração

Código Problemas 5k + Solicitações de pull 165 Ações Projetos 136

Novo problema Jump to bottom

"está demorando muito tempo inesperadamente" # 27310


Fechadas hamidabdulmalik abriu esta edição on 30 Jan 2019 · 84 comentários

Labels severe: crash tool

Hamidabdulmalik comentou on 30 Jan 2019

I keep getting "this is taking an unexpectedly long time" message on terminal when i run the "flutter run"
command. Whats your take on this? Nothing is working.

73 3 2 2

zoechi commented on 30 Jan 2019 Contributor

Please provide more context.

zoechi added the waiting for customer response label on 30 Jan 2019

hamidabdulmalik commented on 30 Jan 2019 Author

Thanks for your response. When I hook up my mobile device, and run the "flutter run" command, after a few
minutes waiting, I get the message "this is taking an unexpectedly long time" and that's it. It just remains that
way.

15

https://github.com/flutter/flutter/issues/27310 1/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter

no-response bot removed the waiting for customer response label on 30 Jan 2019

zoechi commented on 30 Jan 2019 Contributor

Please add the output of flutter doctor -v .

zoechi added severe: crash waiting for customer response tool labels on 30 Jan 2019

hamidabdulmalik commented on 30 Jan 2019 Author

This is the flutter doctor -v output

no-response bot removed the waiting for customer response label on 30 Jan 2019

hamidabdulmalik commented on 30 Jan 2019 Author

https://github.com/flutter/flutter/issues/27310 2/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter

And this is the issue I am having

kangwang1988 commented on 31 Jan 2019 • edited Member

@hamidabdulmalik
Are you saying that it works fine in flutter doctor but will get stuck when flutter run ?
Besides, can you reproduce this issue using latest master?

kangwang1988 commented on 31 Jan 2019 • edited by zoechi Member

This code snippet(located in flutter_tools/lib/src/base/logger.dart:AnsiSpinner) might be the cause:

void _callback(Timer timer) {


assert(this.timer == timer);
assert(timer != null);
assert(timer.isActive);
stdout.write('${_backspace * (spinnerIndent + 1)}');
ticks += 1;
stdout.write('${_clear * spinnerIndent}$_currentAnimationFrame');
if (seemsSlow) {
if (slowWarningCallback != null) {
_slowWarning = ' ' + slowWarningCallback();

https://github.com/flutter/flutter/issues/27310 3/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter
} else {
_slowWarning = ' ' + _defaultSlowWarning;
}
stdout.write(_slowWarning);
}
}

kangwang1988 added the waiting for customer response label on 31 Jan 2019

hamidabdulmalik commented on 31 Jan 2019 Author

@kangwang1988 exactly, at the moment, only "flutter doctor" works. Please, how do I revert to a later
master?

no-response bot removed the waiting for customer response label on 31 Jan 2019

kangwang1988 commented on 31 Jan 2019 Member

@dnfield
Do you have more context towards AnsiSpinner's timer-callback behavior?

dnfield commented on 31 Jan 2019 Member

No, @Hixie may

kangwang1988 commented on 31 Jan 2019 Member

cc @Hixie

https://github.com/flutter/flutter/issues/27310 4/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter

hamidabdulmalik commented on 31 Jan 2019 • edited Author

I am making a fresh install. Will let you know when I am done, but we need to know why this problem
happens

zoechi added the waiting for customer response label on 31 Jan 2019

hamidabdulmalik commented on 31 Jan 2019 Author

@zoechi after fresh installation, even "flutter doctor -v" command stopped working. Just displaying the same
message on the terminal.

no-response bot removed the waiting for customer response label on 31 Jan 2019

kangwang1988 commented on 31 Jan 2019 Member

@hamidabdulmalik
Paste full result(text instead of screenshot) for flutter -v doctor -v please.

zoechi added the waiting for customer response label on 31 Jan 2019

hamidabdulmalik commented on 31 Jan 2019 Author

@kangwang1988

https://github.com/flutter/flutter/issues/27310 5/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter

no-response bot removed the waiting for customer response label on 31 Jan 2019

kangwang1988 commented on 31 Jan 2019 Member

https://github.com/flutter/flutter/issues/27310 6/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter

after fresh installation, even "flutter doctor -v" command stopped working. Just displaying the same
message on the terminal.

flutter doctor seems fine based on your screenshot above.

hamidabdulmalik commented on 31 Jan 2019 Author

after fresh installation, even "flutter doctor -v" command stopped working. Just displaying the same
message on the terminal.

flutter doctor seems fine based on your screenshot above.

Yes, everything seems fine, except I cannot run "flutter run" successfully

hamidabdulmalik commented on 1 Feb 2019 Author

anything? anybody?

38 hidden items
Load more…

Iampato commented on 8 Apr 2019 • edited

Fixed this by:

https://github.com/flutter/flutter/issues/27310 7/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter

download gradle 4.10.1 all zip extracted to a more accessible dir e.g ( C:\ )

then updated my system variables

and now
flutter run/build works

https://github.com/flutter/flutter/issues/27310 8/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter

Iampato mentioned this issue on 8 Apr 2019

Flutter build/run " licenses - This is taking an unexpectedly long time" #30483
Closed

VikoVoila commented on 9 Apr 2019 • edited

have anyone solved this problem?

newtonmunene99 commented on 13 Apr 2019

@Iampato tried it. But didn't quite solve the issue.

MeshkaniMohammad commented on 15 Apr 2019

I had the same problem even in running flutter doctor but it just takes more time and workes after 3-4
minutes later. and none of the mentioned ways couldn't solve my problem.

BriedaAbdul commented on 18 Apr 2019 • edited

i had almost the same issue by running flutter build apk --release it was given nothing but when i tried to
simply run flutter build apk i have got the apk-release

TheKetan2 commented on 30 Apr 2019

In my case the problem is about to be "Android License" because when i running flutter doctor -v
, it showing "Checking Android License is taking unexpected long time".

https://github.com/flutter/flutter/issues/27310 9/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter

you can resolve issues related to Android License by running command flutter doctor --android-
licenses

TheKetan2 commented on 30 Apr 2019

Hi there, after updating Android SDK build tools and restarting PC flutter started working again.

egorges commented on 1 May 2019

I have the same issue without Android SDK.


I use VSCode on Mac, and when I build for ios (either simulator or device), I receive lots of:
(This is taking an unexpectedly long time.)

On simulator, 'only' around 20 of them.


But on device it keeps scrolling screen for several minutes.

BriedaAbdul commented on 2 May 2019 • edited

For my side it was about the updating sdk when i downgraded everything and run Flutter clean then Flutter
build everything works perfectly
Try to run it in the command Line not in IDE terminal because After 3 or 4 minutes it'll go throw away the
process

AkashRajpurohit commented on 12 May 2019

Same issue here.


The output of flutter doctor -v

[✓] Flutter (Channel stable, v1.2.1, on Linux, locale en_IN)


• Flutter version 1.2.1 at /home/akash/flutter
• Framework revision 8661d8aecd (3 months ago), 2019-02-14 19:19:53 -0800
• Engine revision 3757390fa4

https://github.com/flutter/flutter/issues/27310 10/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter
• Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /home/akash/Android
• Android NDK location not configured (optional; useful for native profiling
support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /home/akash/Android
• Java binary at: /usr/lib/jvm/java-8-openjdk-amd64/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-2-b11)
• 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.io/setup/#android-setup for detailed
instructions).

[✓] VS Code (version 1.32.3)


• VS Code at /usr/share/code
• Flutter extension version 2.25.1

[✓] Connected device (1 available)


• Redmi Note 4 • f6c2c2929804 • android-arm64 • Android 7.0 (API 24)

! Doctor found issues in 1 category.

and output of flutter run -v

[ +64 ms] executing: [/home/akash/flutter/] git rev-parse --abbrev-ref


--symbolic @{u}
[ +84 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/stable
[ ] executing: [/home/akash/flutter/] git rev-parse --abbrev-ref HEAD
[ +22 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] stable
[ ] executing: [/home/akash/flutter/] git ls-remote --get-url origin
[ +19 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +1 ms] executing: [/home/akash/flutter/] git log -n 1 --pretty=format:%H
[ +21 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[ ] 8661d8aecd626f7f57ccbcb735553edc05a2e713
[ ] executing: [/home/akash/flutter/] git log -n 1 --pretty=format:%ar
[ +20 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[ ] 3 months ago
[ +1 ms] executing: [/home/akash/flutter/] git describe --match v*.*.*
--first-parent --long --tags
[ +23 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long
--tags
[ +2 ms] v1.2.1-0-g8661d8aec
[ +191 ms] executing: /home/akash/Android/platform-tools/adb devices -l
[ +27 ms] Exit code 0 from: /home/akash/Android/platform-tools/adb devices -l
[ ] List of devices attached
f6c2c2929804 device usb:1-1.1 product:mido
model:Redmi_Note_4 device:mido transport_id:2

https://github.com/flutter/flutter/issues/27310 11/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter
[ +515 ms] /home/akash/Android/platform-tools/adb -s f6c2c2929804 shell getprop
[ +110 ms] ro.hardware = qcom
[+1449 ms] Launching lib/main.dart on Redmi Note 4 in debug mode...
[ +48 ms] Initializing gradle...
[ +32 ms] Using gradle from
/home/akash/Documents/testing_stuff/flutter/demo/android/gradlew.
[ +15 ms] executing:
/home/akash/Documents/testing_stuff/flutter/demo/android/gradlew -v

And it just stops there.

PS: I don't have android studio but android sdk tools as well as gradle are all properly configured as i have
build projects with Ionic and React Native. Trying flutter out but stuck in the very first step.

khalithartmann commented on 12 May 2019

so i realized that every once in a while you have to delete the ios and android files and rebuild them. You
have to constantly keep those up to date . I created a flutter project when flutter was still in beta and i was
frequently running into very weird issues (one of them was this one).
When i deleted the ios and android files and ran "flutter create . " it solved a lot of my problems . Note that
this will delete all gradle , manifest , plist. .. configs so i would save those . Hope it helps . You can also check
out this link : https://github.com/flutter/flutter/wiki/Workarounds-for-common-issues#generated-project-files-
outdated

BriedaAbdul commented on 12 May 2019

Try to clean by running flutter clean then run flutter run -v

AkashRajpurohit commented on 12 May 2019

Tried flutter clean and flutter run..still no luck...

e sim, vou tentar o método que khalithartmann sugeriu .. atualize o flutter sdk, exclua as pastas do Android
do iOS e crie o flutter.

https://github.com/flutter/flutter/issues/27310 12/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter

BriedaAbdul comentou on 12 May 2019

Onde você está executando seu comando? Vou sugerir que você execute seu código na CLI, não no
terminal IDE. Porque parece que seu aplicativo está atualizando seu gradle, vai demorar um pouco

AkashRajpurohit comentou on 12 May 2019

Estou executando o comando no Terminal. Terminal não integrado do código do Visual Studio que estou
usando para desenvolvimento

nandkk05 comentou on 13 May 2019 • editado

Recentemente, eu estava sofrendo do mesmo problema, mas agora ele foi resolvido quando atualizei com
o Flutter SDK mais recente e reiniciei meu laptop.

(No meu caso)


Se novamente parecer "demorando muito" , ligue a conexão com a Internet e aguarde de 10 a 15
minutos. Ele começará a funcionar automaticamente.

Esse problema ocorre principalmente quando você importa outros projetos, portanto, eles exigem uma
versão diferente do Gradle para criar o apk.

Espero que isso ajude

AkashRajpurohit comentou on 13 May 2019

Ótimo ouvir isso.


Algumas perguntas para esclarecimento

1. Atualizar dart Sdk == atualizar o flutter sdk que deve ser instalado certo?
2. Você tentou executar seu aplicativo por meio de emulador ou dispositivo real?
3. Explique um pouco melhor o que você quer dizer com a versão diferente do Gradle

https://github.com/flutter/flutter/issues/27310 13/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter

nandkk05 comentou on 13 May 2019 • editado

1. Instale o Flutter SDK v1.5.4-hotfix.2-stable.zip mais recente .


No meu caso, tenho flutter_windows_v1.2.1-stable

2. Estou executando meu aplicativo no dispositivo real (Redmi 4x)

3. Você pode verificar a versão do Gradle no arquivo build.gradle na pasta Android.

Quer dizer, se você estiver usando o Gradle 5.3.1 para construir seu projeto e, em seguida, compartilhar
esse arquivo com qualquer outro desenvolvedor. Portanto, ele deve baixar a mesma versão do Gradle 5.3.1
ou superior para trabalhar com o seu código ...
Baixe os arquivos do Gradle aqui https://gradle.org/

Espero que isso ajude!

MisterAwesome23 comentou on 17 Dec 2019 • editado

Eu entendo que esta pode ser uma resposta simples, mas posso querer tentar.
Eu estava usando um dispositivo Android real para "executar vibração" comando que inicialmente rendeu -
"está demorando muito tempo inesperadamente"
Eu simplesmente encerrei esse processo.
Prosseguiu para desconectar o telefone.
Alterne a porta usb.
Refazer.
Funcionou :)
E como dizemos, "de alguma forma funcionou :)"

2 3

AbeMoe comentou on 30 Jan 2020

Comigo, parecia que meu telefone redefiniu meus padrões de "transferência de arquivo" para "Somente
carga" e flutter não me avisou sobre isso e não foi capaz de sincronizar os arquivos.

Troquei meu telefone de volta para transferência de arquivos e está bom agora.

Espero que isto ajude.

https://github.com/flutter/flutter/issues/27310 14/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter

mallaire77 comentou on 21 Apr 2020

Eu tive um problema semelhante, no meu caso, eu tinha uma dependência que exigia o iOS 11 que não
precisava mais e removia do meu pubspec.yaml . Acho que quando fiz isso, meu alvo iOS caiu para iOS 8
em vez de 11, mas devido a uma dependência remanescente que ainda exigia o alvo iOS 11, isso estava
causando a falha na minha compilação.

Eu consertei isso executando:

flutter clean && \


cd ios && \
rm -rf Pods && \
rm -rf .symlinks && \
pod install && \
cd ..

1 2

JohnnyLuv comentou on 23 Apr 2020

1. exclua seu lockfile


caminho de vibração assim: /Users/xxx/Desktop/flutter/bin/cache

2. remova seu App.framework


caminho assim: /my-app/ios/Flutter/App.framework

3. reinicie seu IDE

4 - flutter clean

5 flutter run

jbetts80 comentou on 7 May 2020

Eu tive um problema semelhante, no meu caso, eu tinha uma dependência que exigia o iOS 11 que
não precisava mais e removia do meu pubspec.yaml . Acho que quando fiz isso, meu alvo iOS caiu
para iOS 8 em vez de 11, mas devido a uma dependência remanescente que ainda exigia o alvo iOS
11, isso estava causando a falha na minha compilação.

Eu consertei isso executando:

https://github.com/flutter/flutter/issues/27310 15/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter

flutter clean && \


cd ios && \
rm -rf Pods && \
rm -rf .symlinks && \
pod install && \
cd ..

Isso funcionou!

raghavendra905 comentou on 20 May 2020 • editado

use flutter run -v


ele normalmente baixa gradle (que é um arquivo grande) pela primeira vez que você executa um programa
flutter. O acima irá ajudá-lo a ver a mensagem de que está baixando gradle / dist. Isso não acontecerá no
próximo programa

shakilur157 comentou on 26 May 2020

Liguei a VPN antes de executar o comando "flutter build apk" e funcionou embora idk por quê.

sathwikdoddi comentou on 6 Jul 2020 • editado

Nenhuma dessas soluções funcionou para mim.

saída de flutter doctor -v:

[✓] Flutter (Channel master, 1.20.0-1.0.pre, on Mac OS X 10.15.5 19F101, locale


en-US)
• Flutter version 1.20.0-1.0.pre at /Users/sathwikdoddi/Documents/flutter
• Framework revision f8a4008e41 (3 weeks ago), 2020-06-16 08:41:22 -0700
• Engine revision 965fbbed17
• Dart version 2.9.0 (build 2.9.0-14.0.dev 2b917f5b6a)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/sathwikdoddi/Library/Android/sdk
• Platform android-29, build-tools 29.0.3

https://github.com/flutter/flutter/issues/27310 16/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.5)


• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.5, Build version 11E608c
• CocoaPods version 1.9.1

[✓] Android Studio (version 4.0)


• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 46.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.46.1)


• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.12.1

[✓] Connected device (1 available)


• iPhone 11 • 0B932A3D-FFE3-4A4A-947F-EE67AF8DC6F9 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-13-5 (simulator)

• No issues found!

Every time I run a project, It takes "an unexpectedly long time..." and half of the time, I get an error saying
"Could not build the application for the simulator. Error launching application on iPhone 11." The only way to
fix the launch error is by removing the Pods folder from the ios directory and rerunning. But the unexpectedly
long time error is not going away no matter what I try to do.

If anyone has a solution for either of my problems, it would be much appreciated

sathwikdoddi commented on 6 Jul 2020

Here is the could not build error with flutter run -v:

[+1680 ms] Could not build the application for the simulator.
[ ] Error launching application on iPhone 11.
[ +11 ms] "flutter run" took 144,131ms.
[ +14 ms]
#0 throwToolExit
(package:flutter_tools/src/base/common.dart:14:3)
#1 RunCommand.runCommand
(package:flutter_tools/src/commands/run.dart:578:7)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand

https://github.com/flutter/flutter/issues/27310 17/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter
(package:flutter_tools/src/runner/flutter_command.dart:844:18)
#3 _rootRunUnary (dart:async/zone.dart:1198:47)
#4 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#5 _FutureListener.handleValue
(dart:async/future_impl.dart:143:18)
#6 Future._propagateToListeners.handleValueCallback
(dart:async/future_impl.dart:696:45)
#7 Future._propagateToListeners
(dart:async/future_impl.dart:725:32)
#8 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#9 _AsyncAwaitCompleter.complete
(dart:async-patch/async_patch.dart:40:15)
#10 _completeOnAsyncReturn
(dart:async-patch/async_patch.dart:311:13)
#11 RunCommand.usageValues
(package:flutter_tools/src/commands/run.dart)
#12 _rootRunUnary (dart:async/zone.dart:1198:47)
#13 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#14 _FutureListener.handleValue
(dart:async/future_impl.dart:143:18)
#15 Future._propagateToListeners.handleValueCallback
(dart:async/future_impl.dart:696:45)
#16 Future._propagateToListeners
(dart:async/future_impl.dart:725:32)
#17 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#18 Future._asyncCompleteWithValue.<anonymous closure>
(dart:async/future_impl.dart:567:7)
#19 _rootRun (dart:async/zone.dart:1190:13)
#20 _CustomZone.run (dart:async/zone.dart:1093:19)
#21 _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#22 _CustomZone.bindCallbackGuarded.<anonymous closure>
(dart:async/zone.dart:1037:23)
#23 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#24 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#25 _runPendingImmediateCallback
(dart:isolate-patch/isolate_patch.dart:118:13)
#26 _RawReceivePortImpl._handleMessage
(dart:isolate-patch/isolate_patch.dart:169:5)

psc215 commented on 18 Aug 2020

Update your dependencies before running and try running by commenting out dependency_overrides

nomicool commented on 25 Dec 2020 • edited

https://github.com/flutter/flutter/issues/27310 18/19
11/02/2021 "this is taking an unexpectedly long time" · Issue #27310 · flutter/flutter

I have fixed that issue by installing the latest JDK and JRE and added both paths to environment variables. it
fixes my flutter pub get speed but flutter urn and apk build still taking much time.

Assignees

No one assigned

Labels

severe: crash tool

Projects

None yet

Milestone

No milestone

Linked pull requests

Successfully merging a pull request may close this issue.

None yet

44 participantes

e outros

https://github.com/flutter/flutter/issues/27310 19/19

You might also like