[英]Differences between DartEditor and Dart plugin for Eclipse
我使用DartEditor開發了一個飛鏢/聚合物項目。 由於DartEditor不支持Git,因此我移至Eclipse並安裝了Dart插件。 現在突然出現新錯誤,我沒有進入Dart編輯器,我想知道會有什么不同。 Dart-SDK和Dartium版本完全相同。 我將相應的文件夾從DartEditor復制到Eclipse文件夾。
Eclipse插件的版本是1.6.0.dev_01_02,Dart編輯器是1.6.0.dev_01_02,Dart-SDK是1.6.0-dev.1.2。
我收到的錯誤消息是:
Loading polymer transformers...
Serving mastermind web on http://localhost:8080
[Warning from polymer (Linter) on mastermind|web/mm-color-button.html]:
line 2, column 1 of web/mm-color-button.html: Missing definition for <polymer-element>, please add the following HTML import at the top of this file: <link rel="import" href="packages/polymer/polymer.html">.
[Warning from polymer (Linter) on mastermind|web/mm-game.html]:
line 2, column 1 of web/mm-game.html: Missing definition for <polymer-element>, please add the following HTML import at the top of this file: <link rel="import" href="packages/polymer/polymer.html">.
[Error from polymer (Linter) on mastermind|web/mm-game.html]:
line 3, column 1 of web/mm-game.html: Polymer.dart's implementation of HTML imports are not supported within polymer element definitions, yet. Please move the import out of this <polymer-element>.
Build error:
Transform ImportInliner on mastermind|web/mastermind.html threw error: Could not find asset mastermind|web/mm-game.html.
build failed with errors: {Transform polymer (Linter) on mastermind|web/mm-color-button-line.html threw error: Polymer.dart's implementation of HTML imports are not supported within polymer element definitions, yet. Please move the import out of this <polymer-element>., Transform polymer (Linter) on mastermind|web/mm-line.html threw error: Polymer.dart's implementation of HTML imports are not supported within polymer element definitions, yet. Please move the import out of this <polymer-element>., Transform polymer (Linter) on mastermind|web/mm-line.html threw error: Polymer.dart's implementation of HTML imports are not supported within polymer element definitions, yet. Please move the import out of this <polymer-element>., Transform polymer (Linter) on mastermind|web/mm-game.html threw error: Polymer.dart's implementation of HTML imports are not supported within polymer element definitions, yet. Please move the import out of this <polymer-element>.}
可能是因為聚合物版本不同。 在DartEditor中,我有0.9.5 + 2,在Eclipse中是0.11.0 + 5。 我以為pub get會自動將軟件包更新為最新版本(如果依賴於任何版本)。
聚合物發生了什么變化? 為什么現在這會出錯?
這些是正常消息,我認為它們不是由Eclipse插件引起的。
您能否檢查一下,在每個Polymer元素定義文件的頂部是否都有polymer.html
導入
<link rel="import" href="packages/polymer/polymer.html">
<!-- other element imports -->
<polymer-element name='some-name>
<!-- no elements imports in here or below -->
<template>
<!-- style imports are allowed here -->
</template>
<script ...>
</polymer-element>
eclipse插件和dart編輯器之間沒有區別,但是聚合物包裝的不同版本之間沒有區別。 兩個版本之間有很多更改,我必須相應地修改代碼。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.