首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >获取Flutter Cupertino_icons依赖错误

获取Flutter Cupertino_icons依赖错误
EN

Stack Overflow用户
提问于 2020-02-02 02:27:04
回答 1查看 835关注 0票数 0

我在我的项目中遇到了这个错误。我甚至创建了一个新的平面颤动项目,但我也收到了同样的错误。

我甚至试过清除flutter.pub-cache\hosted\pub.dartlang.org\cupertino_icons -****。我甚至尝试过专门给出版本名。但它仍然在abccdddd的workRunning“扑动酒吧得到”..。1.0s在调试模式下启动SM J600G上的lib\main.dart ...正在运行Gradle任务“assembleDebug”...

代码语言:javascript
复制
Compiler message:
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:1:1: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
We:
^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:1:1: Error: Expected ';' after this.
We:
^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:1:3: Error: Expected a declaration, but got ':'.
We:
  ^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:1: Error: Expected a declaration, but got '-'.
- commit this file in order for git to create a lib/ directory, and
^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:10: Error: Expected an identifier, but got 'this'.
- commit this file in order for git to create a lib/ directory, and
         ^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:10: Error: Expected ';' after this.
- commit this file in order for git to create a lib/ directory, and
         ^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:15: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
- commit this file in order for git to create a lib/ directory, and
              ^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:15: Error: Expected ';' after this.
- commit this file in order for git to create a lib/ directory, and
              ^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:20: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
- commit this file in order for git to create a lib/ directory, and
                   ^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:20: Error: Expected an identifier, but got 'in'.
- commit this file in order for git to create a lib/ directory, and
                   ^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:20: Error: Expected ';' after this.
- commit this file in order for git to create a lib/ directory, and
                   ^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:23: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
- commit this file in order for git to create a lib/ directory, and
                      ^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:23: Error: Expected ';' after this.
- commit this file in order for git to create a lib/ directory, and
                      ^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:29: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
- commit this file in order for git to create a lib/ directory, and
                            ^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:29: Error: Expected an identifier, but got 'for'.
- commit this file in order for git to create a lib/ directory, and
                            ^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:29: Error: Expected ';' after this.
- commit this file in order for git to create a lib/ directory, and
                            ^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:37: Error: Expected ';' after this.
- commit this file in order for git to create a lib/ directory, and
                                    ^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:47: Error: Expected ';' after this.
- commit this file in order for git to create a lib/ directory, and
                                              ^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:49: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
- commit this file in order for git to create a lib/ directory, and
                                                ^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:49: Error: Expected ';' after this.
- commit this file in order for git to create a lib/ directory, and
                                                ^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:52: Error: Expected a declaration, but got '/'.
- commit this file in order for git to create a lib/ directory, and
                                                   ^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:54: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
- commit this file in order for git to create a lib/ directory, and
                                                     ^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:65: Error: Expected ';' after this.
- commit this file in order for git to create a lib/ directory, and
                                                                ^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:1: Error: Expected a declaration, but got '-'.
- want a lib/ directory so pub will create a well-formed .packages file
^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:8: Error: Expected ';' after this.
- want a lib/ directory so pub will create a well-formed .packages file
       ^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:8: Error: 'a' is already declared in this scope.
- want a lib/ directory so pub will create a well-formed .packages file
       ^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:47: Context: Previous declaration of 'a'.
- commit this file in order for git to create a lib/ directory, and
                                              ^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
- want a lib/ directory so pub will create a well-formed .packages file
         ^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:10: Error: Expected ';' after this.
- want a lib/ directory so pub will create a well-formed .packages file
         ^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:10: Error: 'lib' is already declared in this scope.
- want a lib/ directory so pub will create a well-formed .packages file
         ^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:49: Context: Previous declaration of 'lib'.
- commit this file in order for git to create a lib/ directory, and
                                                ^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:13: Error: Expected a declaration, but got '/'.
- want a lib/ directory so pub will create a well-formed .packages file
            ^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:25: Error: Expected ';' after this.
- want a lib/ directory so pub will create a well-formed .packages file
                        ^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:32: Error: Expected ';' after this.
- want a lib/ directory so pub will create a well-formed .packages file
                               ^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:44: Error: Expected ';' after this.
- want a lib/ directory so pub will create a well-formed .packages file
                                           ^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:44: Error: 'a' is already declared in this scope.
- want a lib/ directory so pub will create a well-formed .packages file
                                           ^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:8: Context: Previous declaration of 'a'.
- want a lib/ directory so pub will create a well-formed .packages file
       ^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:46: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
- want a lib/ directory so pub will create a well-formed .packages file
                                             ^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:46: Error: Expected ';' after this.
- want a lib/ directory so pub will create a well-formed .packages file
                                             ^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:50: Error: Expected a declaration, but got '-'.
- want a lib/ directory so pub will create a well-formed .packages file
                                                 ^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:68: Error: Expected ';' after this.
- want a lib/ directory so pub will create a well-formed .packages file
                                                                   ^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:68: Error: 'file' is already declared in this scope.
- want a lib/ directory so pub will create a well-formed .packages file
                                                                   ^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:15: Context: Previous declaration of 'file'.
- commit this file in order for git to create a lib/ directory, and
              ^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:3: Error: Type 'commit' not found.
- commit this file in order for git to create a lib/ directory, and
  ^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:33: Error: Type 'git' not found.
- commit this file in order for git to create a lib/ directory, and
                                ^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:40: Error: Type 'create' not found.
- commit this file in order for git to create a lib/ directory, and
                                       ^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:3: Error: Type 'want' not found.
- want a lib/ directory so pub will create a well-formed .packages file
  ^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:15: Error: 'directory' isn't a type.
- want a lib/ directory so pub will create a well-formed .packages file
              ^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:54: Context: This isn't a type.
- commit this file in order for git to create a lib/ directory, and
                                                     ^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:28: Error: Type 'pub' not found.
- want a lib/ directory so pub will create a well-formed .packages file
                           ^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:37: Error: Type 'create' not found.
- want a lib/ directory so pub will create a well-formed .packages file
                                    ^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:51: Error: Type 'formed.packages' not found.
- want a lib/ directory so pub will create a well-formed .packages file
                                                  ^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:3: Error: 'commit' isn't a type.
- commit this file in order for git to create a lib/ directory, and
  ^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:33: Error: 'git' isn't a type.
- commit this file in order for git to create a lib/ directory, and
                                ^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:2:40: Error: 'create' isn't a type.
- commit this file in order for git to create a lib/ directory, and
                                       ^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:3: Error: 'want' isn't a type.
- want a lib/ directory so pub will create a well-formed .packages file
  ^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:28: Error: 'pub' isn't a type.
- want a lib/ directory so pub will create a well-formed .packages file
                           ^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:37: Error: 'create' isn't a type.
- want a lib/ directory so pub will create a well-formed .packages file
                                    ^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt:3:51: Error: 'formed.packages' can't be used as a type because 'formed' isn't defined.
- want a lib/ directory so pub will create a well-formed .packages file
                                                  ^^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.

FAILURE: Build failed with an exception.

* Where:
Script 'E:\Flutter Apps\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 780

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'E:\Flutter Apps\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

任何帮助都是非常感谢的

EN

回答 1

Stack Overflow用户

发布于 2020-12-29 04:49:27

我打开了.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/placeholder.txt文件并将其清除。它开始对我起作用了。真的很奇怪,但它确实发生了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60019893

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档