diff --git a/frameworks/native/runtime/sts_runtime.cpp b/frameworks/native/runtime/sts_runtime.cpp index f3181a029ec797307c39ecfa9268bddd254f6407..c51ccd0bce5f5d9b243f4a4954dcb20ecc0299b1 100644 --- a/frameworks/native/runtime/sts_runtime.cpp +++ b/frameworks/native/runtime/sts_runtime.cpp @@ -660,6 +660,12 @@ std::unique_ptr STSRuntime::LoadStsModule(const std::string& TAG_LOGE(AAFwkTag::STSRUNTIME, "Class_FindMethod loadClass failed"); return std::make_unique(); } + ani_class contextCls {}; + if (aniEnv->FindClass("std.interop.InteropContext", &contextCls) == ANI_OK) { + TAG_LOGD(AAFwkTag::STSRUNTIME, "setDefaultInteropLinker"); + aniEnv->Class_CallStaticMethodByName_Void(contextCls, "setDefaultInteropLinker", "C{std.core.RuntimeLinker}:", + object); + } std::string entryPath = EntryPathManager::GetInstance().GetEntryPath(srcEntrance); ani_string entryClassStr; aniEnv->String_NewUTF8(entryPath.c_str(), entryPath.length(), &entryClassStr);