默认在makecode新建的插件中是自动关联radio这个库的,但是同时导入蓝牙插件时会报错
报错内容
(先导入自己的插件后导入蓝牙):Extensions radio and pxt-qcar are incompatible with bluetooth. Remove them and add bluetooth?
或者(先导入蓝牙后导入自己的插件):Extension bluetooth is incompatible with pxt-qcar. Remove bluetooth and add pxt-qcar?
Extension bluetooth is incompatible with “xxx”. Remove bluetooth and add “xxx”?
Extensions radio and “xxx” are incompatible with bluetooth. Remove them and add bluetooth?
Extension bluetooth is incompatible with “xxx”.jpg

原因:蓝牙和插件冲突。默认在makecode新建的插件中是自动关联radio这个库的,但是同时导入蓝牙插件时会报错。新建项目时有radio,这个可以删除。点开JavaScript界面和会发现有个radio,但是后面带个锁,删不掉,应该是和插件绑定了,想删除radio只能一起删掉。
makecode bluetooth.jpg

解决方法:删掉pxt.json里面的

 "microphone": "*",

更改后需要创建realease(注意这一点特别重要,如果你想导入插件到其他项目中,你必须创建一个realease。参考:https://makecode.microbit.org/github/release