From 6edbf2ee6f513523afbf656a3fe642d6918bc485 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Mon, 2 Mar 2026 19:38:15 -0800 Subject: [PATCH] Fix MissingSoLoaderLibrary: Add @SoLoaderLibrary annotation (#55506) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/55506 Add the SoLoaderLibrary("jsijniprofiler") annotation to HermesSamplingProfiler to fix the MissingSoLoaderLibrary androidlint warning. This annotation helps track which native libraries are loaded by this class, improving build and startup optimization analysis. Also added the required dependency on soloader annotation library in the BUCK file. changelog: [internal] internal Reviewed By: alanleedev Differential Revision: D92022030 fbshipit-source-id: 78d15632b413fe2fac08c24ae1e3dfd5dc6107e0 --- .../facebook/hermes/instrumentation/HermesSamplingProfiler.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/hermes/instrumentation/HermesSamplingProfiler.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/hermes/instrumentation/HermesSamplingProfiler.kt index 9fef00ed214..be0c8f1a1ea 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/hermes/instrumentation/HermesSamplingProfiler.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/hermes/instrumentation/HermesSamplingProfiler.kt @@ -8,8 +8,10 @@ package com.facebook.hermes.instrumentation import com.facebook.soloader.SoLoader +import com.facebook.soloader.annotation.SoLoaderLibrary /** Hermes sampling profiler static JSI API. */ +@SoLoaderLibrary("jsijniprofiler") public object HermesSamplingProfiler { init { SoLoader.loadLibrary("jsijniprofiler")