2d-inc / HistoryOfEverything

Flutter Launch Timeline Demo
https://medium.com/2dimensions/the-history-of-everything-981d989e1b45
MIT License
6.48k stars 984 forks source link

flutter has exited unexpectedly #40

Open crazyqiang opened 5 years ago

crazyqiang commented 5 years ago

I had installed the flutter SDK, when I execute the following command

git clone https://github.com/2d-inc/HistoryOfEverything.git cd HistoryOfEverything/app git submodule init git submodule update flutter run

There is something wrong as follow:

bogon:app mq$ flutter run Running "flutter packages get" in app... 7.0s Launching lib/main.dart on ALP AL00 in debug mode... Initializing gradle... ⢿ Oops; flutter has exited unexpectedly.

Sending crash report to Google. Failed to send crash report due to a network error: SocketException: OS Error: Operation timed out, errno = 60, address = clients2.google.com, port = 51139 Crash report written to /Users/mq/flutter/demo/HistoryOfEverything/app/flutter_01.log; please let us know at https://github.com/flutter/flutter/issues. bogon:app mq$

And my network is well ,What is wrong ? help me ,thanks

crazyqiang commented 5 years ago

and this is the flutter_01.log :

Flutter crash report; please file at https://github.com/flutter/flutter/issues.

command

flutter run

exception

ProcessException: ProcessException: Process "/Users/mq/flutter/demo/HistoryOfEverything/app/android/gradlew" exited abnormally: Unzipping /Users/mq/.gradle/wrapper/dists/gradle-4.4-all/9br9xq1tocpiv8o6njlyu5op1/gradle-4.4-all.zip to /Users/mq/.gradle/wrapper/dists/gradle-4.4-all/9br9xq1tocpiv8o6njlyu5op1

Exception in thread "main" java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:219) at java.util.zip.ZipFile.(ZipFile.java:149) at java.util.zip.ZipFile.(ZipFile.java:163) at org.gradle.wrapper.Install.unzip(Install.java:214) at org.gradle.wrapper.Install.access$600(Install.java:27) at org.gradle.wrapper.Install$1.call(Install.java:74) at org.gradle.wrapper.Install$1.call(Install.java:48) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) at org.gradle.wrapper.Install.createDist(Install.java:48) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) Command: /Users/mq/flutter/demo/HistoryOfEverything/app/android/gradlew -v

#0      runCheckedAsync (package:flutter_tools/src/base/process.dart:251:5)
<asynchronous suspension>
#1      _initializeGradle (package:flutter_tools/src/android/gradle.dart:185:9)
<asynchronous suspension>
#2      _ensureGradle (package:flutter_tools/src/android/gradle.dart:166:37)
<asynchronous suspension>
#3      _readGradleProject (package:flutter_tools/src/android/gradle.dart:95:31)
<asynchronous suspension>
#4      _gradleProject (package:flutter_tools/src/android/gradle.dart:87:34)
<asynchronous suspension>
#5      getGradleAppOut (package:flutter_tools/src/android/gradle.dart:81:29)
<asynchronous suspension>
#6      AndroidApk.fromAndroidProject (package:flutter_tools/src/application_package.dart:96:23)
<asynchronous suspension>
#7      getApplicationPackageForPlatform (package:flutter_tools/src/application_package.dart:283:30)
<asynchronous suspension>
#8      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:269:21)
<asynchronous suspension>
#9      HotRunner.run (package:flutter_tools/src/run_hot.dart:272:39)
<asynchronous suspension>
#10     RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:398:37)
<asynchronous suspension>
#11     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:401:18)
#12     _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#13     _rootRunUnary (dart:async/zone.dart:1132:38)
#14     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#15     _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#16     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
#17     Future._propagateToListeners (dart:async/future_impl.dart:671:32)
#18     Future._complete (dart:async/future_impl.dart:476:7)
#19     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#20     _AsyncAwaitCompleter.complete (dart:async/runtime/libasync_patch.dart:28:18)
#21     _completeOnAsyncReturn (dart:async/runtime/libasync_patch.dart:295:13)
#22     RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#23     _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#24     _rootRunUnary (dart:async/zone.dart:1132:38)
#25     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#26     _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#27     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
#28     Future._propagateToListeners (dart:async/future_impl.dart:671:32)
#29     Future._complete (dart:async/future_impl.dart:476:7)
#30     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#31     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20)
#32     _rootRun (dart:async/zone.dart:1124:13)
#33     _CustomZone.run (dart:async/zone.dart:1021:19)
#34     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#35     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#36     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#37     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#38     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)

flutter doctor

[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.13.6 17G65, locale zh-Hans-CN)
    • Flutter version 1.0.0 at /Users/mq/flutter
    • Framework revision 5391447fae (4 weeks ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.1)
    • Android SDK at /Users/mq/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
    • All Android licenses accepted.

[!] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    ✗ libimobiledevice and ideviceinstaller are not installed. To install with Brew, run:
        brew update
        brew install --HEAD usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    ✗ ios-deploy not installed. To install with Brew:
        brew install ios-deploy
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
        For more info, see https://flutter.io/platform-plugins
      To install:
        brew install cocoapods
        pod setup

[✓] Android Studio (version 3.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 23.2.1
    • Dart plugin version 171.4424
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[!] IntelliJ IDEA Ultimate Edition (version 2018.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[✓] Connected device (1 available)
    • ALP AL00 • UYT0218126002025 • android-arm64 • Android 8.1.0 (API 27)

! Doctor found issues in 2 categories.
luigi-rosso commented 5 years ago

I'm not sure, I've tried on a couple devices here and builds are working for both Android and iOS. Could you follow the suggestion in the log and post an issue at https://github.com/flutter/flutter/issues with the crash report that was written to your filesystem?

crazyqiang commented 5 years ago

thanks, finally it works, a nice app ! I see the log , once it shows permission deny , I try ‘sudo’ then it works