Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在悬浮窗中使用list组件时报错 #314

Open
ltxhhz opened this issue Jan 22, 2025 · 1 comment
Open

在悬浮窗中使用list组件时报错 #314

ltxhhz opened this issue Jan 22, 2025 · 1 comment

Comments

@ltxhhz
Copy link

ltxhhz commented Jan 22, 2025

代码是组件示例修改的

var win = floaty.rawWindow(
  <frame>
    <list id="list">
      <vertical>
        <text id="name" textSize="16sp" textColor="#000000" text="姓名: {{name}}" />
        <text id="age" textSize="16sp" textColor="#000000" text="年龄: {{age}}岁" />
        <button id="deleteItem" text="删除" />
      </vertical>
    </list>
  </frame>
)

var items = [
  { name: '小明', age: 18 },
  { name: '小红', age: 30 },
  { name: '小东', age: 19 },
  { name: '小强', age: 31 },
]
win.setSize(-1, -1)
win.list.setDataSource(items)

win.list.on('item_click', function (item, i, itemView, listView) {
  toast('被点击的人名字为: ' + item.name + ',年龄为: ' + item.age)
})

win.list.on('item_bind', function (itemView, itemHolder) {
  itemView.deleteItem.on('click', function () {
    let item = itemHolder.item
    toast('被删除的人名字为: ' + item.name + ',年龄为: ' + item.age)
    items.splice(itemHolder.position, 1)
  })
})

setInterval(() => {}, 1e3)
12:34:22.905/V: 开始运行 [$remote/main-test.js].
12:34:23.020/E: Failed resolution of: Ljdk/dynalink/DynamicLinkerFactory;
java.lang.Exception: Failed resolution of: Ljdk/dynalink/DynamicLinkerFactory;
    at org.autojs.autojs.runtime.ScriptRuntime$Companion.popException(ScriptRuntime.kt:844) 
    at org.autojs.autojs.tool.CrashHandler.uncaughtException(CrashHandler.kt:49) 
    at org.chromium.base.JavaExceptionReporter.uncaughtException(chromium-TrichromeWebViewGoogle6432.aab-stable-677813533:32) 
    at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1071) 
    at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1066) 
    at java.lang.Thread.dispatchUncaughtException(Thread.java:2306) 
@ltxhhz
Copy link
Author

ltxhhz commented Jan 22, 2025

安卓14 HyperOS 1.0.47.0
Autojs6 v6.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant