嘗試在我的項目中實現角度組件的新發布的應用程序佈局組件。 即使進口import'package:angular_components/angular_components.dart';
鏢後會因MaterialIconComponent, MaterialPersistentDrawerDirective, MaterialTemporaryDrawerComponent,
錯誤應用程序佈局AngularDart中角度組件的組件
[Info from Dart2JS]:
Compiling my_app|web/main.dart...
[Error from Dart2JS on my_app|web/main.dart]:
web\main.template.dart:16:1:
Can't read 'package:my_app/views/app_component/app_component.template.dart' (Could not find asset my_app|lib/views/app_component/app_component.template.dart.).
import 'package:my_app/views/app_component/app_component.template.dart' as i1;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Error from Dart2JS on my_app|web/main.dart]:
web\packages\my_app\views\app_component\app_component.dart:25:5:
Not a compile-time constant.
MaterialIconComponent,
^^^^^^^^^^^^^^^^^^^^^
[Dart2JS on my_app|web/main.dart]:
3 warning(s) suppressed in package:my_app.
[Info from Dart2JS]:
Took 0:00:07.975139 to compile my_app|web/main.dart.
Build failed.
錯誤的錯誤:中保
Found 3 mismatching dependencies on package:build:
* angular2 requires ^0.9.0
* angular_components->angular requires ^0.10.0
* angular_components->angular->angular_compiler requires ^0.10.0
軟件包相關項目
dependencies:
angular2: "^3.1.0"
angular_components: "^0.6.0-alpha+3"
browser: "^0.10.0+2"
dart_to_js_script_rewriter: "^1.0.3"
firebase: "^4.1.0"
這聽起來並不像它的相關到佈局組件。嘗試關閉IDE,刪除'.pub'目錄,運行'pub upgrade',然後再次啓動IDE。 –
通過刪除.pub目錄沒有任何更改,運行pub升級錯誤仍會引發相同。 –
您使用的是什麼Dart版本? –