8***@qq.com
8***@qq.com
  • 发布:2025-01-17 15:32
  • 更新:2025-01-22 11:07
  • 阅读:71

HBuilder X android云打包 错误

分类:HBuilderX

时间: 2025-01-17 14:37:38 类型: Android云端证书 打包失败

e: file://[PackagePath]/wgtRoot/UNIB36439B/.uniappx/android/src/pages/customer/customer.kt:40:138 Unresolved reference: customerName
e: file://[PackagePath]/wgtRoot/UNIB36439B/.uniappx/android/src/pages/customer/customer.kt:46:141 Unresolved reference: creationTime
e: file://[PackagePath]/wgtRoot/UNIB36439B/.uniappx/android/src/pages/customer/customer.kt:56:111 Unresolved reference: ownerName

就调用了个接口,循环展示字段,打包不成功;
uni-app x 项目,非云端项目

2025-01-17 15:32 负责人:无 分享
已邀请:
DCloud_App_Array

DCloud_App_Array

从提示信息看应该uts代码有问题,请使用标准基座真机运行看是否可以正常运行?

  • 8***@qq.com (作者)

    真机也运行不了,

    <view v-for="(customer, index) in customerList" :key="index" class="customer-item">

    <view class="row">

    <view @click="goToDetail(customer)" class="left" style="font-weight: bold;">

    {{ customer.customerName }}

    </view>

    <view class="right">正在跟进</view>

    </view>

    <view class="row">

    <view class="left">创建时间:{{ formatTimestamp(customer.creationTime) }}</view>

    <view class="right">

    <image class="avatar" src="/static/user.png"></image>

    </view>

    </view>

    </view>

    本地浏览器正常运行,android打包 customer.customerName 无法识别

    2025-01-18 10:17

DCloud_App_Array

DCloud_App_Array

在本地真机运行到android设备,把编译报错提示信息发出来

  • 8***@qq.com (作者)

    10:37:04.493 请在杀毒软件中设置扫描排除名单,减少系统资源消耗。详情

    10:37:05.145 当前工程11个页面,正在编译为android class,此过程耗时较长...

    10:37:30.581 [plugin:uni:app-uts] 编译失败

    10:37:30.581 ‌error: Unresolved reference: customerName‌

    10:37:30.581 at pages/customer/customer.uvue:8:18

    10:37:30.581 6 | <view class="row">

    10:37:30.581 7 | <view @click="goToDetail(customer)" class="left" style="font-weight: bold;">

    10:37:30.581 8 | {{ customer.customerName }}

    10:37:30.581 | ^

    10:37:30.581 9 | </view>

    10:37:30.581 10 | <view class="right">正在跟进</view>

    10:37:30.581 ‌error: Unresolved reference: creationTime‌

    10:37:30.581 at pages/customer/customer.uvue:13:57

    10:37:30.582 11 | </view>

    10:37:30.582 12 | <view class="row">

    10:37:30.582 13 | <view class="left">创建时间:{{ formatTimestamp(customer.creationTime) }}</view>

    10:37:30.582 | ^

    10:37:30.582 14 | <view class="right">

    10:37:30.582 15 | <image class="avatar" src="/static/user.png"></image>

    10:37:30.582 ‌error: Unresolved reference: ownerName‌

    2025-01-22 11:08

8***@qq.com

8***@qq.com (作者)

10:37:04.493 请在杀毒软件中设置扫描排除名单,减少系统资源消耗。详情
10:37:05.145 当前工程11个页面,正在编译为android class,此过程耗时较长...
10:37:30.581 [plugin:uni:app-uts] 编译失败
10:37:30.581 ‌error: Unresolved reference: customerName‌
10:37:30.581 at pages/customer/customer.uvue:8:18
10:37:30.581 6 | <view class="row">
10:37:30.581 7 | <view @click="goToDetail(customer)" class="left" style="font-weight: bold;">
10:37:30.581 8 | {{ customer.customerName }}
10:37:30.581 | ^
10:37:30.581 9 | </view>
10:37:30.581 10 | <view class="right">正在跟进</view>
10:37:30.581 ‌error: Unresolved reference: creationTime‌
10:37:30.581 at pages/customer/customer.uvue:13:57
10:37:30.582 11 | </view>
10:37:30.582 12 | <view class="row">
10:37:30.582 13 | <view class="left">创建时间:{{ formatTimestamp(customer.creationTime) }}</view>
10:37:30.582 | ^
10:37:30.582 14 | <view class="right">
10:37:30.582 15 | <image class="avatar" src="/static/user.png"></image>
10:37:30.582 ‌error: Unresolved reference: ownerName‌

  • DCloud_App_Array

    关键错误信息:Unresolved reference: customerName‌

    customerName‌在哪里定义的?其它uts文件中定义的需要import。

    2025-01-22 11:24

  • 8***@qq.com (作者)

    回复 DCloud_App_Array: customerName是customer对象 客户 的一个属性 客户名称,接口返回的json数据,没有定义,H5网页上不需要定义对象可以直接可以运行,打包到android需要在uts文件里定义这些对象和属性吗?感谢。

    2025-01-22 14:03

  • 8***@qq.com (作者)

    回复 DCloud_App_Array: uve后缀的可以,uvue后缀的不可以,不清楚uvue的需要设置什么

    2025-01-22 15:03

要回复问题请先登录注册