Flutter異常報錯

在給項目配置圖片的時候報錯
Error on line 44, column 4 of pubspec.yaml: Expected a key while parsing a block mapping.

name: wangyicloud
description: A new Flutter application.

# 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: 1.0.0+1

environment:
  sdk: ">=2.1.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2

dev_dependencies:
  flutter_test:
    sdk: flutter


# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  # 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/
    - images/bottom/
    - images/icons/
    - images/play/

  # 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

根據(jù)代碼中的提示远豺,44行導(dǎo)致錯誤霹购,查找了半天原因 是因為assets前多了空格要和uses-material-design: true對齊

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市该肴,隨后出現(xiàn)的幾起案子葛假,更是在濱河造成了極大的恐慌障陶,老刑警劉巖,帶你破解...
    沈念sama閱讀 206,214評論 6 481
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件聊训,死亡現(xiàn)場離奇詭異抱究,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)带斑,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,307評論 2 382
  • 文/潘曉璐 我一進(jìn)店門鼓寺,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人勋磕,你說我怎么就攤上這事妈候。” “怎么了挂滓?”我有些...
    開封第一講書人閱讀 152,543評論 0 341
  • 文/不壞的土叔 我叫張陵苦银,是天一觀的道長。 經(jīng)常有香客問我,道長墓毒,這世上最難降的妖魔是什么吓揪? 我笑而不...
    開封第一講書人閱讀 55,221評論 1 279
  • 正文 為了忘掉前任亲怠,我火速辦了婚禮所计,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘团秽。我一直安慰自己主胧,他們只是感情好,可當(dāng)我...
    茶點故事閱讀 64,224評論 5 371
  • 文/花漫 我一把揭開白布习勤。 她就那樣靜靜地躺著踪栋,像睡著了一般。 火紅的嫁衣襯著肌膚如雪图毕。 梳的紋絲不亂的頭發(fā)上夷都,一...
    開封第一講書人閱讀 49,007評論 1 284
  • 那天,我揣著相機(jī)與錄音予颤,去河邊找鬼囤官。 笑死,一個胖子當(dāng)著我的面吹牛蛤虐,可吹牛的內(nèi)容都是我干的党饮。 我是一名探鬼主播,決...
    沈念sama閱讀 38,313評論 3 399
  • 文/蒼蘭香墨 我猛地睜開眼驳庭,長吁一口氣:“原來是場噩夢啊……” “哼刑顺!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起饲常,我...
    開封第一講書人閱讀 36,956評論 0 259
  • 序言:老撾萬榮一對情侶失蹤蹲堂,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后贝淤,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體柒竞,經(jīng)...
    沈念sama閱讀 43,441評論 1 300
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 35,925評論 2 323
  • 正文 我和宋清朗相戀三年霹娄,在試婚紗的時候發(fā)現(xiàn)自己被綠了能犯。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 38,018評論 1 333
  • 序言:一個原本活蹦亂跳的男人離奇死亡犬耻,死狀恐怖踩晶,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情枕磁,我是刑警寧澤渡蜻,帶...
    沈念sama閱讀 33,685評論 4 322
  • 正文 年R本政府宣布,位于F島的核電站,受9級特大地震影響茸苇,放射性物質(zhì)發(fā)生泄漏排苍。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 39,234評論 3 307
  • 文/蒙蒙 一学密、第九天 我趴在偏房一處隱蔽的房頂上張望淘衙。 院中可真熱鬧,春花似錦腻暮、人聲如沸彤守。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,240評論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽具垫。三九已至,卻和暖如春试幽,著一層夾襖步出監(jiān)牢的瞬間筝蚕,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 31,464評論 1 261
  • 我被黑心中介騙來泰國打工铺坞, 沒想到剛下飛機(jī)就差點兒被人妖公主榨干…… 1. 我叫王不留起宽,地道東北人。 一個月前我還...
    沈念sama閱讀 45,467評論 2 352
  • 正文 我出身青樓康震,卻偏偏與公主長得像燎含,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子腿短,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 42,762評論 2 345

推薦閱讀更多精彩內(nèi)容