清泛IT社区App Inventor 2 中文社区

搜索

扫码访问移动社区 移动社区,您的掌上技术专家

关注我,精彩不错过! 关注我,精彩不错过!

扫码安装最新版AI伴侣 最新版AI伴侣v2.76

Aia StoreApp上架指南 .aia 源码一站式解决方案 发布日志AI2连接测试ai2Starter模拟器

AppInventor2离线版中文教育版接入DeepSeek VIP会员 享专有教程,免费赠送基础版*技术支持服务! AI2入门必读中文文档AI2拓展IoT专题

打印 上一主题 下一主题

[解决中] AI助手重构版问题记录

  • TA的每日心情
    开心
    8 小时前
  • 签到天数: 743 天

    [LV.9]以坛为家II

    1053

    主题

    1752

    帖子

    4万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    积分
    49975

    AI2中文网VIP弹球达人接水果达人撸猫达人

    11#
    发表于 昨天 22:34 | 只看该作者
    ❌ 失败 1 项:
    • 嵌套块验证失败:组件 BluetoothLE1(BluetoothLE) 没有方法 "WriteString",已拒绝添加

    [{"action": "ADD_BLOCK_INTENT","intent":[{"var": "deviceList","init":{"list":[]}},{"var": "selectedDevice","init": ""},{"var": "connectedDevice","init": ""},{"event": "ScanButton.Click","do":[{"set_prop": "StatusLabel.Text","value": "状态:正在扫描设备..."},{"set_prop": "DeviceList.Elements","value":{"list":["扫描中..."]}},{"call": "BluetoothLE1.StartScanning","args":{}}]},{"event": "StopScanButton.Click","do":[{"call": "BluetoothLE1.StopScanning","args":{}},{"set_prop": "StatusLabel.Text","value": "状态:扫描已停止"}]},{"event": "BluetoothLE1.DeviceFound","do":[{"list_add":{"list":{"get_var": "deviceList"},"item":{"join":[{"get_var": "name"}," (",{"get_var": "address"},")"]}}},{"set_prop": "DeviceList.Elements","value":{"get_var": "deviceList"}},{"set_prop": "StatusLabel.Text","value":{"join":["状态:发现设备 ",{"get_var": "name"}]}}]},{"event": "DeviceList.AfterPicking","do":[{"set_var": "selectedDevice","value":{"select_item":{"list":{"get_prop": "DeviceList.Elements"},"index":{"get_prop": "DeviceList.SelectionIndex"}}}},{"set_prop": "StatusLabel.Text","value":{"join":["状态:已选择 ",{"get_var": "selectedDevice"}]}},{"set_prop": "ConnectButton.Enabled","value":true}]},{"event": "ConnectButton.Click","do":[{"call": "BluetoothLE1.Connect","args":{"address":{"text_split":{"text":{"get_var": "selectedDevice"},"at": "("}}}},{"set_prop": "StatusLabel.Text","value": "状态:正在连接..."}]},{"event": "BluetoothLE1.Connected","do":[{"set_var": "connectedDevice","value":{"get_var": "selectedDevice"}},{"set_prop": "ConnectedDeviceLabel.Text","value":{"join":["已连接设备:",{"get_var": "connectedDevice"}]}},{"set_prop": "DisconnectButton.Enabled","value":true},{"set_prop": "SendButton.Enabled","value":true},{"set_prop": "ConnectButton.Enabled","value":false},{"set_prop": "StatusLabel.Text","value": "状态:连接成功"}]},{"event": "DisconnectButton.Click","do":[{"call": "BluetoothLE1.Disconnect","args":{}},{"set_var": "connectedDevice","value": ""},{"set_prop": "ConnectedDeviceLabel.Text","value": "已连接设备:无"},{"set_prop": "DisconnectButton.Enabled","value":false},{"set_prop": "SendButton.Enabled","value":false},{"set_prop": "ConnectButton.Enabled","value":true},{"set_prop": "StatusLabel.Text","value": "状态:已断开连接"}]},{"event": "SendButton.Click","do":[{"call": "BluetoothLE1.WriteString","args":{"service": "0000ffe0-0000-1000-8000-00805f9b34fb","characteristic": "0000ffe1-0000-1000-8000-00805f9b34fb","text":{"get_prop": "DataInput.Text"}}},{"set_prop": "StatusLabel.Text","value": "状态:数据已发送"}]},{"event": "BluetoothLE1.StringReceived","do":[{"set_prop": "DataDisplay.Text","value":{"join":[{"get_prop": "DataDisplay.Text"},"\n",{"get_var": "text"}]}},{"set_prop": "StatusLabel.Text","value": "状态:收到数据"}]},{"event": "BluetoothLE1.ErrorOccurred","do":[{"call": "Notifier1.ShowAlert","args":{"message":{"join":["BLE错误:",{"get_var": "message"}]}}},{"set_prop": "StatusLabel.Text","value":{"join":["状态:错误 - ",{"get_var": "message"}]}}]}]},{"action": "CLEANUP_BLOCKS"}]
    App Inventor 2 中文网 - MIT同步更新的中文本土化平台!v2.76 支持Android 15 & iOS 更新日志
  • TA的每日心情
    开心
    8 小时前
  • 签到天数: 743 天

    [LV.9]以坛为家II

    1053

    主题

    1752

    帖子

    4万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    积分
    49975

    AI2中文网VIP弹球达人接水果达人撸猫达人

    12#
    发表于 昨天 22:43 | 只看该作者
    ❌ 失败 1 项:
    • AI 生成的 JSON 格式有误(可能括号/引号不匹配),请重新发送需求让 AI 重新生成

    [{"action": "ADD_BLOCK_INTENT","intent":[{"function": "计算水仙花数","params":[],"return":{"do_return":{"do":[{"local_var": "result","value":{"list":[]},"do":[{"for_range":{"var": "i","from": 100,"to": 999,"step": 1,"do":[{"local_var": "百位","value":{"divide":[{"get_var": "i"},100]},"do":[]},{"local_var": "十位","value":{"modulo":[{"divide":[{"get_var": "i"},10]},10]},"do":[]},{"local_var": "个位","value":{"modulo":[{"get_var": "i"},10]},"do":[]},{"local_var": "立方和","value":{"add":[{"power":[{"get_var": "百位"},3]},{"power":[{"get_var": "十位"},3]},{"power":[{"get_var": "个位"},3]}]},"do":[]},{"if":{"eq":[{"get_var": "立方和"},{"get_var": "i"}]},"then":[{"list_add":{"list":{"get_var": "result"},"item":{"get_var": "i"}}}]}]}]}],"value":{"get_var": "result"}}}}]},{"action": "CLEANUP_BLOCKS"}]
    App Inventor 2 中文网 - MIT同步更新的中文本土化平台!v2.76 支持Android 15 & iOS 更新日志
  • TA的每日心情
    开心
    8 小时前
  • 签到天数: 743 天

    [LV.9]以坛为家II

    1053

    主题

    1752

    帖子

    4万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    积分
    49975

    AI2中文网VIP弹球达人接水果达人撸猫达人

    13#
    发表于 昨天 22:45 | 只看该作者
    ❌ 失败 1 项:
    • AI 生成的 JSON 格式有误(可能括号/引号不匹配),请重新发送需求让 AI 重新生成

    [{"action": "ADD_BLOCK_INTENT","intent":[{"event": "SendButton.Click","do":[{"if":{"is_empty":{"get_prop": "MessageInput.Text"}},"then":[{"call": "Notifier1.ShowAlert","args":{"message": "请输入消息内容"}}],"else_do":[{"call_proc": "显示消息气泡","args":{"message":{"get_prop": "MessageInput.Text"},"isMine":true}},{"set_prop": "MessageInput.Text","value": ""}]}]},{"procedure": "显示消息气泡","params":["message","isMine"],"do":[{"local_var": "bubble","value":{"call": "VerticalArrangement1","args":{}},"do":[{"set_prop": "bubble.Width","value": -2},{"set_prop": "bubble.Height","value": -1},{"set_prop": "bubble.AlignHorizontal","value":{"choose":{"test":{"get_var": "isMine"},"then": 3,"else": 1}}},{"local_var": "bubbleContent","value":{"call": "HorizontalArrangement1","args":{}},"do":[{"set_prop": "bubbleContent.Width","value": -1},{"set_prop": "bubbleContent.Height","value": -1},{"set_prop": "bubbleContent.BackgroundColor","value":{"choose":{"test":{"get_var": "isMine"},"then": "&HFF2196F3","else": "&HFFFFFFFF"}}},{"set_prop": "bubbleContent.Shape","value": 1},{"set_prop": "bubbleContent.Margin","value": 5},{"local_var": "messageLabel","value":{"call": "Label1","args":{}},"do":[{"set_prop": "messageLabel.Width","value": -2},{"set_prop": "messageLabel.Height","value": -1},{"set_prop": "messageLabel.Text","value":{"get_var": "message"}},{"set_prop": "messageLabel.TextColor","value":{"choose":{"test":{"get_var": "isMine"},"then": "&HFFFFFFFF","else": "&HFF000000"}}},{"set_prop": "messageLabel.FontSize","value": 16},{"set_prop": "messageLabel.Margin","value": 10}]}]}]}]},{"action": "CLEANUP_BLOCKS"}]]

    执行失败: Expected ',' or '}' after property value in JSON at position 1600 (line 1 column 1601)
    App Inventor 2 中文网 - MIT同步更新的中文本土化平台!v2.76 支持Android 15 & iOS 更新日志
  • TA的每日心情
    开心
    8 小时前
  • 签到天数: 743 天

    [LV.9]以坛为家II

    1053

    主题

    1752

    帖子

    4万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    积分
    49975

    AI2中文网VIP弹球达人接水果达人撸猫达人

    14#
    发表于 2 小时前 | 只看该作者
    ❌ 失败 1 项:
    • 代码块添加失败,工作区已恢复: 块 component_event: Connection checks failed.

    [{"action": "ADD_BLOCK_INTENT","intent":[{"var": "chatHistory","init":{"list":[]}},{"var": "isThinking","init":false},{"event": "SendButton.Click","do":[{"if":{"and":[{"not":{"is_empty":{"get_prop": "InputTextBox.Text"}}},{"not":{"get_var": "global isThinking"}}]},"then":[{"set_var": "global isThinking","value":true},{"set_prop": "SendButton.Text","value": "思考中..."},{"set_prop": "SendButton.BackgroundColor","value": "&HFF9E9E9E"},{"local_var": "userMessage","value":{"get_prop": "InputTextBox.Text"},"do":[{"list_add":{"list":{"get_var": "global chatHistory"},"item":{"dict":[{"dict_pair":{"key": "role","value": "user"}},{"dict_pair":{"key": "content","value":{"get_var": "userMessage"}}}]}}},{"call": "ChatListView.AddItem","args":{"mainText":{"join":["用户: ",{"get_var": "userMessage"}]},"detailText": "","imageName": ""}},{"set_prop": "InputTextBox.Text","value": ""},{"call": "LLMAI2Ext1.Chat","args":{"content":{"get_var": "userMessage"}}}]}],"else_do":[{"if":{"get_var": "global isThinking"},"then":[{"call": "Notifier1.ShowAlert","args":{"notice": "正在思考中,请稍候..."}}],"else_do":[{"call": "Notifier1.ShowAlert","args":{"notice": "请输入问题内容"}}]}]}]},{"event": "LLMAI2Ext1.GotText","do":[{"call": "ChatListView.AddItem","args":{"mainText":{"join":["AI: ",{"text": "text"}]},"detailText": "","imageName": ""}},{"set_var": "global isThinking","value":false},{"set_prop": "SendButton.Text","value": "发送"},{"set_prop": "SendButton.BackgroundColor","value": "&HFF4CAF50"}]},{"event": "Screen6.ErrorOccurred","do":[{"call": "Notifier1.ShowAlert","args":{"notice":{"join":["请求失败: ",{"get_var": "message"}]}}},{"set_var": "global isThinking","value":false},{"set_prop": "SendButton.Text","value": "发送"},{"set_prop": "SendButton.BackgroundColor","value": "&HFF4CAF50"}]},{"event": "ClearButton.Click","do":[{"call": "ChatListView.AddItems","args":{"itemsList":{"list":[]}}},{"set_var": "global chatHistory","value":{"list":[]}},{"call": "Notifier1.ShowAlert","args":{"notice": "聊天记录已清空"}}]},{"event": "InputTextBox.GotFocus","do":[{"call": "InputTextBox.HideKeyboard"}]},{"event": "Screen6.Initialize","do":[{"call": "Notifier1.ShowAlert","args":{"notice": "请先设置DeepSeek API密钥\n在组件属性中配置APIKey"}}]}]},{"action": "CLEANUP_BLOCKS"}]
    App Inventor 2 中文网 - MIT同步更新的中文本土化平台!v2.76 支持Android 15 & iOS 更新日志
  • TA的每日心情
    开心
    8 小时前
  • 签到天数: 743 天

    [LV.9]以坛为家II

    1053

    主题

    1752

    帖子

    4万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    积分
    49975

    AI2中文网VIP弹球达人接水果达人撸猫达人

    15#
    发表于 半小时前 | 只看该作者
    设置屏幕属性 没了? 设置了没效果,设置到component了,且把项目破坏了
    设置组件属性 要测试
    指令中空格又出现了?
    App Inventor 2 中文网 - MIT同步更新的中文本土化平台!v2.76 支持Android 15 & iOS 更新日志
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    © 2026 tsingfun.com, Inc.  沪ICP备2020034476号-1  沪公网安备31011702000040号

    GMT+8, 2026-03-07 15:04 , Processed in 0.019847 second(s), 32 queries .