카테고리 없음

pubspec.yaml: A dependency may only have one source. 해결법 (The following adds the Cupertino Icons font to your application.)

투자퀸 2022. 6. 18. 02:35

플러터 프로젝트를 진행하는데 초장부터 빨간색 에러가 나타났습니다.

Error on line 31, column 5 of pubspec.yaml: A dependency may only have one source.
   ╷
31 │ ┌     sdk: flutter
32 │ │     camera:
33 │ │     path_provider:
34 │ │     path:
35 │ │ 
36 │ │   # The following adds the Cupertino Icons font to your application.
37 │ │   # Use with the CupertinoIcons class for iOS style icons.
38 │ │   cupertino_icons: ^1.0.2
   │ └──^
   ╵
pub get failed (65;    ╵)
Process finished with exit code 65

 

저도 초보라 다른 예제를 보고 따라하고 있는데,

따라하는것도 제대로 못하나봅니다..

 

 

결국 32~34번째 줄의 들여쓰기를 1번씩 더 땡겨서 flutter와 맞춰줘야 했습니다.

아래처럼 되야하는거죠

 

dependencies:
  flutter:
    sdk: flutter
  camera:
  path_provider:
  path:

 

여러분도 들여쓰기 라인이 맞는지 다시 확인해보세요