harmony(鸿蒙)Utils FAQ

  • 2022-08-09
  • 浏览 (644)

Utils FAQ

1. Failed to run the KV store on the LiteOS Cortex-A kernel (Hi3516 or Hi3518) due to incorrect path setting for the KV store

Symptom

When the LiteOS Cortex-A kernel (Hi3516 or Hi3518 platform) directly calls the API provided by the KV store, the compiled executable program fails to run.

Possible Causes

The compiled executable program is run directly without being converted to an application using AbilityKit APIs. In this case, the Bundle Manager Service (BMS) cannot correctly set the path for storing application data during application installation. As a result, the KV store fails to run.

Solution

Call the UtilsSetEnv function of the KV store to set the data storage path.

UtilsSetEnv("/storage/com.example.kv");

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)Subsystems

harmony(鸿蒙)AI Framework Development

harmony(鸿蒙)Application Privilege Configuration Guide

harmony(鸿蒙)Development Example

harmony(鸿蒙)Setting Up a Development Environment

harmony(鸿蒙)Development Guidelines

harmony(鸿蒙)Application Framework Overview

harmony(鸿蒙)appspawn Module

harmony(鸿蒙)bootstrap Module

harmony(鸿蒙)FAQs

0  赞