怎么做电商平台网站,WordPress浏览计数插件,温州网站建设首选龙诚互联,网站注册转化率基础认证题库请移步#xff1a;HarmonyOS应用开发者基础认证题库 注#xff1a;有读者反馈#xff0c;题库的代码块比较多#xff0c;打开文章时会卡死。所以笔者将题库拆分#xff0c;单选题20个为一组#xff0c;多选题10个为一组#xff0c;题库目录如下#xff0c;…基础认证题库请移步HarmonyOS应用开发者基础认证题库 注有读者反馈题库的代码块比较多打开文章时会卡死。所以笔者将题库拆分单选题20个为一组多选题10个为一组题库目录如下读者可以按需跳转。如果对您的阅读产生不便笔者在这里向大家说声抱歉请各位读者原谅。完整的md文档等读者把题库整理完会将网盘链接发出。
序号目录
单选题 HarmonyOS应用开发者高级认证Next版本发布后最新题库 - 单选题序号1 HarmonyOS应用开发者高级认证Next版本发布后最新题库 - 单选题序号2 HarmonyOS应用开发者高级认证Next版本发布后最新题库 - 单选题序号3 HarmonyOS应用开发者高级认证Next版本发布后最新题库 - 单选题序号4多选题 HarmonyOS应用开发者高级认证Next版本发布后最新题库 - 多选题序号1 HarmonyOS应用开发者高级认证Next版本发布后最新题库 - 多选题序号2 HarmonyOS应用开发者高级认证Next版本发布后最新题库 - 多选题序号3 HarmonyOS应用开发者高级认证Next版本发布后最新题库 - 多选题序号4 HarmonyOS应用开发者高级认证Next版本发布后最新题库 - 多选题序号5 注题目是乱序每次考试选项的顺序都不同
多选题题库 - 序号5 41、以下关于Localstorage的说法正确有哪些
A、LocalStorage中的所有属性都是不可变的。
B、被Component装饰的组件最多可以访问一个LocalStorage实例和AppStorage未被Entry装饰的组件不可被独立分配LocalStorage实例只能接受父组件的LocalStorage实例。
C、组件树的根节点即被Entry装饰的Component可以被分配一个LocalStorage实例 此组件的所有子组件实例将自动获得对该LocalStorage实例的访问权限。
D、应用程序可以创建多个LocalStorage实例LocalStorage实例可以在页面内共享也可以通过GetShared接口获取在UIAbility里创建的GetShared实现跨页面、UIAbility内共享 。
LocalStorage页面级UI状态存储-管理应用拥有的状态-状态管理V1稳定版-状态管理-学习ArkTS语言-基础入门 | 华为开发者联盟 (huawei.com) 42、在基于Stage模型开发的应用项目代码下每个模块都存在一个module.json5配置文件用于配置模块的基本信息以下module.json5配置文件正确的是
// A
{module: {name: bName,type: shared,deviceTypes: [default,tablet],deliveryWithInstall: true,pages: $profile:main_pages}
}// B 缺少字段【deliveryWithInstall】
{module: {name: aName,type: hardeviceTypes: [default, tablet ]}
}// C 【type】字段不支持【hsp】
{module: {name: cName,type: hsp,description: $string:desc,deviceTypes: [default,tablet],deliveryWithInstal1: true,pages: $profile:main_pages}
}// D
{module: {name: application,type: feature,description: $string:module_desc,mainElement: ApplicationAbility,deviceTypes: [default,tablet],deliverywithInstall: true,installationFree: false,pages: $profile:main_pages,abilities: [{name: ApplicationAbility,srcEntry: ./ets/applicationability/ApplicationAbility.ets, description: $string:ApplicationAbility_desc,icon: $media:icon,label: $string:ApplicationAbility_label,startwindowIcon: $media:startIcon,startWindowBackground: $color:start_window_background,exported: true}]}
} A、A
B、B
C、C
D、D
module.json5配置文件-应用配置文件Stage模型-开发基础知识-基础入门 | 华为开发者联盟 (huawei.com) 43、hiAppEvent提供的Watcher接口订阅到的系统事件哪些包含HiLog日志
A、CPU高负载事件
B、启动耗时事件
C、卡死事件
D、崩溃事件
CPU高负载事件介绍-CPU高负载事件-系统事件-事件订阅-HiAppEvent使用指导-Performance Analysis Kit性能分析服务-调测调优-系统 | 华为开发者联盟 (huawei.com)
启动耗时事件介绍-启动耗时事件-系统事件-事件订阅-HiAppEvent使用指导-Performance Analysis Kit性能分析服务-调测调优-系统 | 华为开发者联盟 (huawei.com)
卡死事件介绍-卡死事件-系统事件-事件订阅-HiAppEvent使用指导-Performance Analysis Kit性能分析服务-调测调优-系统 | 华为开发者联盟 (huawei.com)
崩溃事件介绍-崩溃事件-系统事件-事件订阅-HiAppEvent使用指导-Performance Analysis Kit性能分析服务-调测调优-系统 | 华为开发者联盟 (huawei.com) 44、当前动态import支持导入的模块类型有哪些
A、动态import支持加载OHPM模块
B、动态import支持加载本地HAR模块
C、动态import支持加载HSP模块
D、动态import支持加载远程HAR模块
动态import-应用程序包开发与使用-应用程序包基础知识-开发基础知识-基础入门 | 华为开发者联盟 (huawei.com) 45、ArkTS是鸿蒙生态的应用开发语言。以下哪些选项是ArkTS的设计理念。(我感觉【satety】打错了应该是【safety】)
A、通过规范强化静态检查和分析减少运行时的类型检查从而降低了运行时负载提升执行性能。
B、通过规范强化静态检查和分析 使得许多错误在编译时可以被检测出来降低代码运行错误的风险。
C、ArkTS不支持null-satety特性 。
D、ArkTS保留 了TS大部分的语法特性帮助开发者更容易上手ArkTS。 46、以下代码片段哪几处违反了ArkTS语法规范。
function foo(value: number) {return value;
}foo();
foo(0);
foo(undefined);
foo(null); A. foo(null);
B. foo(undefined);
C. foo();
D.foo(0); 47、以下哪些是可以在Navigation中使用pushPathByName接口传递的params的参数类型不确定把所有选项列出
A、arrayBuffer
B、mapstring,string
C、recordstring,string
D、string 48、HSP支持导出ArkUl组件、接口供应用内的其他HAP/HSP引用下面正确的是不确定把所有选项列出
// A// library/src/main/ets/components/MyTitleBar.ets
Component
export struct MyTitleBar {build() {Row() {Text($r(app.string.library_title )).id(library).fontFamily(HarmonyHeiTi).fontWeight(FontWeight.Bold).fontSize(32).fontColor($r(app.color.text_color))}.width(100%)}
}
// 对外暴露的接口需要在入口文件index.ets中声明:
// library/index.ets
export { MyTitleBar } from ./src/main/ets/components/MyTitleBar;// B// library/src/main/ets/utils/nativeTest.ts
import native from liblibrary.so;
export function nativeMulti(a: number, b: number): number {let result: number native.multi(a, b);return result;
}
// 对外暴露的接口需要在入口文件index.ets中声明:
// library/index.ets
export { nativeMulti } from ./ src/main/ets/utils/nativeTest;// C// library/src/main/ets/utils/test.ts
export class Log {static info(msg: string): void {console.info(msg);}
}
export function add(a: number, b: number): number {return a b;
}
export function minus(a: number, b: number): number {return a - b;
}
// 对外暴露的接口需要在入口文件index.ets中声明:
// library/index.ets
export { Log, add, minus } from ./src/main/ets/utils/test; A、导出ArkUI组件
B、导出native方法在HSP中也可以包含C编写的so。对于so中的native方法HSP通过间接的方式导出以导出liblibrary.so的乘法接口multi为例
C、导出ts类和方法 49、下面关于方舟字节码文件格式描述正确的是
A、方舟字节码文件中数据类型uint32_t表示32-bit无符号整数采用大端字节序
B、方舟字节码文件中不包含字节码文件内容的adler32校验和
C、方舟字节码文件是ArkTS/TS/JS编译后的二进制产物
D、方舟字节码文件中数据类型uint16_t表示16-bit无符号整数采用小端字节序
方舟字节码文件格式-学习ArkTS语言-基础入门 | 华为开发者联盟 (huawei.com) 50、在开发HarmonyOS应用的多元化测试环境中DevEco Studio引入了本地模拟器(Local Emulator)作为重要工具旨在帮助开发者在个人开发机器上高效模拟HarmonyOS环境进行应用或服务的快速运行与细致调试。请根据本地模拟器的实际应用场景与系统要求选出所有正确的描述选项
A、开发者需要注意的是DevEco Studio的本地模拟器可以在虚拟机内部进一步运行以节省硬件资源。
B、为了保证流畅的运行和调试体验本地模拟器推荐macOS系统版本至少为12.5以上。
C、DevEco Studio的本地模拟器允许开发者在个人电脑上模拟HarmonyOS环境便于应用或服务的运行与调试。
D、mac计算机配置方面为了确保本地模拟器的稳定运行推荐至少配备8GB RAM。
使用环境-概述-使用模拟器运行应用/服务-应用/服务运行-DevEco Studio | 华为开发者联盟 (huawei.com) 51、下面关于混淆的描述正确的是
A、支持顶层作用域名称、 属性名称、文件名称等多种混淆功能
B、修改应用混淆配置新配置需要重新全量编译应用才能生效
C、在工程build-profile.json5中的obfuscation.ruleOptions.files字段中配置该工程的混淆配置该配置仅在编译该工程时生 效。
D、可以在HAR模块工程的build-profile.json5中的obfuscation.consumerFiles字段中配置导出的混淆配置该配置仅在编译 依赖该HAR的模块时生效。
代码混淆-ArkTS方舟编程语言-应用框架 | 华为开发者联盟 (huawei.com) 52、如下哪些方式可实现图片动态播放不确定不知道代码是不是故意给错了
// A
import {AnimationOptions, AnimatedDrawableDescriptor} from ohos.arkui.drawableDescriptor
import image from ohos.multimedia.imageEntry
Component
struct ImageExample {pixelmaps: ArrayPixelMap [];options: AnimationOptions {duration:2000, iterations:1};State animated: AnimatedDrawableDescriptor | undefined undefined;async aboutToAppear() {this.pixelmaps await this.getPixelMaps();this.animated new AnimatedDrawableDescriptor(this.pixelmaps, this.options);}build() {Column() {Row() {Image(this.animated).width(500px).height(280px)}.height(50%)Row() {Button(once).width(100).padding(5).onClick(() {this.options {duration:2000, iterations:1};this.animated new AnimatedDrawableDescriptor(this.pixelmaps, this.options);}).margin(5)}}.width(50%)}private async getPixmapFromMedia(resource: Resource) {let unit8Array await getContext(this)?.resourceManager?.getMediaContent({bundleName: resource.bundleName,moduleName: resource.moduleName,id: resource.id})let imageSource image.createImageSource(unit8Array.buffer.slice(0, unit8Array.buffer.byteLength))let createPixelMap: image.PixelMap await imageSource.createPixelMap({desiredPixelFormat: image.PixelMapFormat.RGBA_8888})await imageSource.release()return createPixelMap}private async getPixelMaps() { // 怎么没有定义MypixelmapsMypixelmaps.push(await this.getPixmapFromMedia($r(app.media.icon))) //对应资源图片名后缀为pngreturn Mypixelmaps;}
}// B
import {AnimationOptions, AnimatedDrawableDescriptor} from ohos.arkui.drawableDescriptor
import image from ohos.multimedia.imageEntry
Component
struct ImageExample {pixelmaps: ArrayPixelMap [];options: AnimationOptions { duration: 2000, iterations: 1 };State animated: AnimatedDrawableDescriptor | undefined undefined;async aboutToAppear() {this.pixelmaps await this.getPixelMaps();this.animated new AnimatedDrawableDescriptor(this.pixelmaps, this.options);}build() {Column() {Row() {Image(this.animated).width(500px).height(280px)}.height(50%)Row() {Button(once).width(100).padding(5).onClick(() {this.options { duration: 2000, iterations: 1 };this.animated new AnimatedDrawableDescriptor(this.pixelmaps, this.options);}).margin(5)}}.width(50%)}private async getPixmapListFromMedia(resource: Resource) {let unit8Array await getContext(this)?.resourceManager?.getMediaContent({bundleName: resource.bundleName,moduleName: resource.moduleName,id: resource.id})let imageSource image.createImageSource(unit8Array.buffer.slice(0, unit8Array.buffer.byteLength))let createPixelMap: Arrayimage.PixelMap await imageSource.createPixelMapList({desiredPixelFormat: image.PixelMapFormat.RGBA_8888})await imageSource.release()return createPixelMap}private async getPixelMaps() {let Mypixelmaps: ArrayPixelMap await this.getPixmapListFromMedia($r(app.media.icon)) //对应资源图片为gifreturn Mypixelmaps;}
}// C
Entry
Component
struct ImageExample {build() {Column({ space: 10 }) {Image($r(app.media.earth)) //对应资源图片名后缀为gif.width(100).height(100)}}
}// D
Entry
Component
struct ImageAnimatorExample {State iterations: number 1build() {Column({ space: 10 }) {ImageAnimator().images([{src: $r(app media.img1)},{src: $r(app media.img2)},{src: $r(app media.img3)},{src: $r(app media.img4)}]).duration(2000).fillMode(FillMode.None).iterations(this.iterations).width(340).height(240).margin({ top: 100 })}.width(100%).height(100%)}
} A、A
B、B
C、C
D、D 53、下面关于混淆规则描述正确的是
A、-keep-global-name [,idetifies,…] 指定想保留的属性名
B、-keep-file-name [,identifirs,...]指定要保留的文件/文件夹的名称
C、-keep-property-name [,idetifies,…]指定要保留的顶层作用域的名称
D、-print-namecache filepath将名称缓存保存 到指定的文件路径。
代码混淆-ArkTS方舟编程语言-应用框架 | 华为开发者联盟 (huawei.com) 54、下面关于Node-API数据类型描述正确的是
A、napi_status是一个枚举数据类型表示Node-API接口返回的状态信息
B、napi_threadsafe_function_release_mode该枚举类型定义了两个常量用于指定线程安全函数的调用模式
C、napi_env用于表示Node-API执行时的上下文
D、napi_threadsafe_function_call_mode该枚举类型定义了两个常量用于指定在何时释放线程安全函数的回调函数
Node-API支持的数据类型和接口-使用Node-API实现跨语言交互-代码开发-NDK开发 | 华为开发者联盟 (huawei.com) 55、以下数据类型中哪些是Sendable数据 。不确定题目代码又双叒叕给错了
import { lang } from kit.ArkTS;class C {}interface I extends lang.ISendable {} A、interface I
B、class C
C、string
D、number