From f23580de47461f85b0b4d053ce8ffcb9cdec40aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=94=E9=B2=81=E6=AD=A3?= <13780741225@163.com> Date: Thu, 10 Sep 2026 11:04:13 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=88=A0=E9=99=A4=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E7=9A=84=20lazy.item=20import=EF=BC=88ledger?= =?UTF-8?q?=20R24=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit item 是 LazyListScope 的成员函数而非顶层扩展,无法 import; 该行单独即可导致 Unresolved reference。仅 items(List) 需要 import。 由 Task 8 实现者 javap 反编译产物核实后推翻我的核验结论。 --- superpowers/plans/2026-09-10-ring-health-app-m0-m1.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/superpowers/plans/2026-09-10-ring-health-app-m0-m1.md b/superpowers/plans/2026-09-10-ring-health-app-m0-m1.md index a99a9e7..3a2e02a 100644 --- a/superpowers/plans/2026-09-10-ring-health-app-m0-m1.md +++ b/superpowers/plans/2026-09-10-ring-health-app-m0-m1.md @@ -2310,7 +2310,6 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.lazy.LazyColumn -import androidx.compose.foundation.lazy.item import androidx.compose.foundation.lazy.items import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Bloodtype @@ -2575,6 +2574,12 @@ private fun HomeContentPreview() { ``` > 说明:`buildMetricCards` 是 `@Composable`(内部调用了 `stringResource`),而 `LazyColumn` 的 content lambda 不是 Composable 上下文,所以必须在进入 `LazyColumn` 之前取值——上面的 `val cards = ...` 就是为此。 +> +> **不要 import `androidx.compose.foundation.lazy.item`(ledger Ruling R24)。** 计划早期版本在这份 +> import 清单里写过它,那一行**单独就能让编译失败**:`item` 是 `LazyListScope` 的**成员函数**, +> 不是顶层扩展,成员函数永远不能 import(报 `Unresolved reference: 'item'`)。 +> 只有 `items(List)` 是 `LazyDsl` 里的顶层扩展,才需要 import。 +> `item { }` 的调用点不受影响,走成员分派即可解析。 - [ ] **Step 7: 追加首页文案与指标名到 `strings.xml`**