2d-inc / HistoryOfEverything

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

Code not running #72

Open javierc opened 4 years ago

javierc commented 4 years ago

I followed the readme command line steps, but when I do "flutter run" I get:

Xcode build done. 29.0s [VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: Unable to load asset: assets/Milky Way/Milky Way.flr

0 PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)

The app opens but none of the images/animations show up. I'm using xcode 11.3

imdatceleste commented 4 years ago

The issue seems to be with the space character in file/directory-names. Once you remove those and redo the nma-files, it should work.

soymonitus commented 4 years ago

Same error here, cannot build and if I rename the asset files I get more errors

pavel-birdy commented 4 years ago

I'm also getting this error. If I try to navigate I get the following error.

The getter 'favorites' was called on null.
Receiver: null
Tried calling: favorites
pavel-birdy commented 4 years ago

Everything is working after migrating the project to AndroidX

gaohuan168 commented 3 years ago
  1. update asset name in pubspec.yaml: from
    • assets/Milky Way/ to
    • assets/Milky_Way/
  2. update asset folder name: from assets/Milky Way to assets/Milky_Way
  3. update asset name in timeline.json,like this: { "source": "Milky_Way/Milky_Way.flr", "width": 1293, "height": 1210, "scale": 0.5, "bounds":[-1616.5, -115.0, -323.5, 1095.0] }
  4. some asset like "Darwin_2.nma" using "Darwin 2.png". update "Darwin_2.nma" from "Darwin 2.png" to "Darwin_2.png" using tool like EmEditor