a***@qq.com
a***@qq.com
  • 发布:2024-09-28 15:48
  • 更新:2024-09-30 15:49
  • 阅读:127

HBuilderX4.28版本下,运行到本机安卓模拟器,控制台打印很多warning

分类:uni-app x

你好。如题,我运行到手机或模拟器,提示以下warning,请问有什么关系的吗? 我是个小白,刚看到这个强大的工具。

15:42:50.936 请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。
15:42:50.936 编译器版本:4.28(uni-app x)
15:42:50.936 正在编译中...
15:43:16.980 ​warning: Condition 'match != null' is always 'true'​
15:43:16.980 at uni_modules/kux-request/common/utils/url.uts:52:6
15:43:16.980 50 | }
15:43:16.980 51 |
15:43:16.980 52 | if (match != null && match.length == 0) {
15:43:16.980 | ^
15:43:16.980 53 | throw new Error('Invalid URL');
15:43:16.980 54 | return;
15:43:16.980 ​warning: Name shadowed: useUtils​
15:43:16.980 at uni_modules/kux-request/common/request.uts:192:9
15:43:16.980 190| mergedOptions.url = baseURL + path;
15:43:16.981 191|
15:43:16.981 192| const useUtils = new Utils();
15:43:16.981 | ^
15:43:16.981 193| if (mergedOptions.query != null) {
15:43:16.981 194| const queryString = useUtils.objToQueryString(mergedOptions.query ?? {} as UTSJSONObject);
15:43:16.981 ​warning: Right operand of elvis operator (?:) is useless if it is null​
15:43:16.981 at uni_modules/kux-request/common/request.uts:385:42
15:43:16.981 383| _options.xhrResponse = options.xhrResponse ?? false;
15:43:16.981 384| this.aborted = false;
15:43:16.981 385| _options.customData = options.customData ?? null;
15:43:16.981 | ^
15:43:16.981 386| _options.needRequestInterceptor = options.needRequestInterceptor ?? true
15:43:16.981 387| _options.needResponseInterceptor = options.needResponseInterceptor ?? true
15:43:16.982 ​warning: Unnecessary safe call on a non-null receiver of type RequestConfig​
15:43:16.982 at uni_modules/kux-request/common/retry.uts:24:6
15:43:16.982 22 | let timeout = 60000;
15:43:16.982 23 | let _this = this;
15:43:16.982 24 | if (options?.timeout != null) {
15:43:16.982 | ^
15:43:16.982 25 | timeout = parseInt(${options.timeout});
15:43:16.982 26 | }
15:43:16.982 ​warning: Elvis operator (?:) always returns the left operand of non-nullable type RequestConfig​
15:43:16.982 at uni_modules/kux-request/common/retry.uts:29:36
15:43:16.982 27 | async function doRequest (): Promise<any> {
15:43:16.982 28 | try {
15:43:16.982 29 | return await _this.request(url, options ?? {} as RequestConfig);
15:43:16.983 | ^
15:43:16.983 30 | } catch (error) {
15:43:16.983 31 | if (delay >= timeout) {
15:43:21.612 检测到编译缓存部分失效,开始差量编译。详见:https://uniapp.dcloud.net.cn/uni-app-x/compiler/#cache
15:43:22.352 当前工程10个页面,正在编译为android class,此过程耗时较长...
15:44:05.124 项目 XXXXXX 编译成功。
15:44:05.181 ready in 76031ms.
15:44:05.237 正在建立手机连接...
15:44:06.062 手机端调试基座版本号为4.28.12301, 版本号相同,跳过基座更新

2024-09-28 15:48 负责人:无 分享
已邀请:
DCloud_heavensoft

DCloud_heavensoft

联系kux-request这个插件作者问下,插件页面有联系方式

要回复问题请先登录注册