1***@qq.com
1***@qq.com
  • 发布:2025-10-24 15:11
  • 更新:2025-10-24 15:11
  • 阅读:18

【报Bug】云插件打自定义包,引入提示不包含该插件,试了好几次

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 版本 Windows 11 专业版 版本号 25H2 安装日期 ‎2025/‎5/‎26 操作系统版本 26200.6899 体验 Windows 功能体验包 1000.26100.253.0

HBuilderX类型: 正式

HBuilderX版本号: 4.76

手机系统: Android

手机系统版本号: Android 13

手机厂商: 小米

手机机型: 小米10Pro

页面类型: vue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
<template>  
    <view class="navbar">  
        <NavBar :options="{ title: '蓝牙管理' }" />  
    </view>  
    <view>  
        <view style="margin: 10px">  
            <view style="font-size: 14px; color: #666666; margin: 5px">附近设备</view>  
            <view style="background-color: #fff; border-radius: 10px">  
                <view v-for="item in BluetoothList" :key="item.address">  
                    <nut-cell :title="item.deviceName" :desc="item.address" @click="connectDevices(item, 'BluetoothList')"></nut-cell>  
                </view>  
            </view>  
        </view>  
        <view class="">  
            <nut-button block type="info" @click="BluetoothSearchDevices">{{ searchText }}</nut-button>  
        </view>  
    </view>  
</template>  

<script setup>  
import NavBar from "@/Y7/components/navBar.vue";  
import { reactive, ref, onMounted } from "vue";  
let BluetoothList = ref([]);  
let searchText = ref("搜索");  
let BluetoothConnectedList = ref([]);  
const plug = uni.requireNativePlugin("Html5app-Gprinter");  
onMounted(() => {  
    if (uni.getStorageSync("BluetoothConnectedList")) {  
        BluetoothConnectedList.value = uni.getStorageSync("BluetoothConnectedList");  
    }  
});  
function BluetoothSearchDevices() {  
    console.log(plug);  
}  
</script>  

<style></style>  

操作步骤:

Android 和 IOS 佳博 蓝牙小票 标签 插件 支持 ESC TSC CPCL 指令

  1. 在插件中选择试用
  2. manifest.json---->安卓/ios原生插件配置,云端插件选择对应插件
  3. 打包新的自定义基座
  4. 运行到页面

预期结果:

引入正常

实际结果:

引入输出undefined

bug描述:

Android 和 IOS 佳博 蓝牙小票 标签 插件 支持 ESC TSC CPCL 指令

这个插件试用,打自定义基座,引入的时候控制台提示

[JS Framework] 当前运行的基座不包含原生插件[Html5app-Gprinter],请在manifest中配置该插件,重新制作包括该原生插件的自定义运行基座

项目配置文件中的原生插件配置里已经勾选并添加了后才打的自定义基座
输出显示undefined

分别在真机和雷电模拟器中测试了

2025-10-24 15:11 负责人:无 分享
已邀请:

要回复问题请先登录注册