8***@qq.com
8***@qq.com
  • 发布:2025-01-18 11:09
  • 更新:2025-01-18 11:09
  • 阅读:10

HBuilder X android云打包 失败

分类:HBuilderX

<template>
<view>
<view v-for="(product, index) in products" :key="index" class="product-item">
<text>{{ product.name }}</text>
<text>{{ product.price }}</text>
</view>
</view>
</template>

<script>
export default {
data() {
return {
products: [
{ name: '商品1', price: '100元' },
{ name: '商品2', price: '200元' },
{ name: '商品3', price: '300元' }
]
};
}
};
</script>

<style>
.product-item {
margin-bottom: 10px;
}
</style>

此段代码在hbuilder x 4.44版本上创建uniapp项目,勾选uni-app x 选择vue3,浏览器运行正常,云打包到android报错,如下:

Appid: UNI10D4AA1
e: file://[PackagePath]/wgtRoot/UNI10D4AA1/.uniappx/android/src/pages/index/index.kt:26:78 Unresolved reference: name
e: file://[PackagePath]/wgtRoot/UNI10D4AA1/.uniappx/android/src/pages/index/index.kt:27:78 Unresolved reference: price

FAILURE: Build failed with an exception.

2025-01-18 11:09 负责人:无 分享
已邀请:

要回复问题请先登录注册