diff --git a/frameworks/native/appkit/app/child_main_thread.cpp b/frameworks/native/appkit/app/child_main_thread.cpp index 2b6e24adc0c975f39be0966aa97c5b1ae6e632c7..262a67d8951627e982a4441425fec1016cd87433 100644 --- a/frameworks/native/appkit/app/child_main_thread.cpp +++ b/frameworks/native/appkit/app/child_main_thread.cpp @@ -281,10 +281,13 @@ void ChildMainThread::HandleLoadNative() void ChildMainThread::InitNativeLib(const BundleInfo &bundleInfo) { HspList hspList; - ErrCode ret = DelayedSingleton::GetInstance()->GetBaseSharedBundleInfos(bundleInfo.name, hspList, - AppExecFwk::GetDependentBundleInfoFlag::GET_ALL_DEPENDENT_BUNDLE_INFO); - if (ret != ERR_OK) { - TAG_LOGE(AAFwkTag::APPKIT, "Get base shared bundle infos failed: %{public}d", ret); + if (processInfo_->childProcessType != CHILD_PROCESS_TYPE_NATIVE && + processInfo_->childProcessType != CHILD_PROCESS_TYPE_NATIVE_ARGS) { + ErrCode ret = DelayedSingleton::GetInstance()->GetBaseSharedBundleInfos(bundleInfo.name, + hspList, AppExecFwk::GetDependentBundleInfoFlag::GET_ALL_DEPENDENT_BUNDLE_INFO); + if (ret != ERR_OK) { + TAG_LOGE(AAFwkTag::APPKIT, "Get base shared bundle infos failed: %{public}d", ret); + } } AppLibPathMap appLibPaths {};