Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

您好,新人下载代码跑不通,想请教一下 #2

Open
zy0055 opened this issue Aug 26, 2024 · 4 comments
Open

您好,新人下载代码跑不通,想请教一下 #2

zy0055 opened this issue Aug 26, 2024 · 4 comments

Comments

@zy0055
Copy link

zy0055 commented Aug 26, 2024

No description provided.

@zy0055
Copy link
Author

zy0055 commented Aug 26, 2024

Use explicit types instead of "any", "unknown" (arkts-no-any-unknown)

Property 'pref' has no initializer and is not definitely assigned in the constructor.

这是其中的一些报错

@banggx
Copy link
Owner

banggx commented Aug 27, 2024

项目内使用到数据库,首选项等能力,预览调试使用模拟器进行,不要使用IDE上的Preview能力;

"Use explicit types instead of "any", "unknown" (arkts-no-any-unknown)" 这个问题可以尝试下在模拟器上是否会出现,可以根据具体报错位置,对 “any” 和 “unknow” 类型进行处理,设置为具体的类型。 可参考社区提问: https://developer.huawei.com/consumer/cn/forum/topic/0203140115012854066

@water-1479
Copy link

项目内使用到数据库,首选项等能力,预览调试使用模拟器进行,不要使用IDE上的Preview能力;

"Use explicit types instead of "any", "unknown" (arkts-no-any-unknown)" 这个问题可以尝试下在模拟器上是否会出现,可以根据具体报错位置,对 “any” 和 “unknow” 类型进行处理,设置为具体的类型。 可参考社区提问: https://developer.huawei.com/consumer/cn/forum/topic/0203140115012854066

up这样的错误也太多了吧,改的好复杂啊,我还找到另一个跟up这个一样的项目不过它的"compileSdkVersion": 9,
"compatibleSdkVersion": 9
imageSDK是9报的错就少一点,如下图:
image

@water-1479
Copy link

项目内使用到数据库,首选项等能力,预览调试使用模拟器进行,不要使用IDE上的Preview能力;

"Use explicit types instead of "any", "unknown" (arkts-no-any-unknown)" 这个问题可以尝试下在模拟器上是否会出现,可以根据具体报错位置,对 “any” 和 “unknow” 类型进行处理,设置为具体的类型。 可参考社区提问: https://developer.huawei.com/consumer/cn/forum/topic/0203140115012854066
SDK9报的错都是Toast的,我搞不懂为什么,up可以帮一下吗
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@banggx @zy0055 @water-1479 and others