在此页面上找到了扩展名 'amp-bind',但未使用。请删除此扩展程序。”

The extension 'amp-bind' was found on this page, but is unused. Please remove this extension."

我有一个使用 amp-bind 的非常简单的 AMP 页面。但是,验证器始终显示此消息:

The extension 'amp-bind' was found on this page, but is unused. Please remove this extension."

我的页面使用amp-bind。该页面的代码在这里:

<!doctype html>
<html ⚡>
  <head>
    <meta charset="utf-8">
    <script async src="https://cdn.ampproject.org/v0.js"></script>
    <link rel="canonical" href="http://localhost/amp-bind.html" />
    <title>AMP bind test</title>
    <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
    <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
    <script async custom-element="amp-bind" src="https://cdn.ampproject.org/v0/amp-bind-0.1.js"></script>
  </head>
  <body class="main">
    <h3>amp-bind example</h3>
    <p [text]="'Hello '+username">Hello World</p>
    <button on="tap:AMP.setState({username: 'rodders'})">Say Hello</button>
  </body>
</html>

谁能解释为什么会显示此消息,我该怎么做才能将其删除?

这是 recently fixed 的错误。解决方法是在您的页面上包含一个 <amp-state> 元素。抱歉!