diff --git a/ReactAndroid/src/main/java/com/facebook/react/module/processing/BUCK b/ReactAndroid/src/main/java/com/facebook/react/module/processing/BUCK index e578bc87e9e..6b2ab0bed76 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/module/processing/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/module/processing/BUCK @@ -22,6 +22,8 @@ rn_java_library( source = "8", target = "8", deps = [ + react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"), + react_native_target("java/com/facebook/react/common:common"), react_native_dep("third-party/java/infer-annotations:infer-annotations"), react_native_dep("third-party/java/javapoet:javapoet"), react_native_dep("third-party/java/jsr-305:jsr-305"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/module/processing/ReactModuleSpecProcessor.java b/ReactAndroid/src/main/java/com/facebook/react/module/processing/ReactModuleSpecProcessor.java index 729c609c3cd..9ea0b1d7fe9 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/module/processing/ReactModuleSpecProcessor.java +++ b/ReactAndroid/src/main/java/com/facebook/react/module/processing/ReactModuleSpecProcessor.java @@ -10,7 +10,9 @@ package com.facebook.react.module.processing; import static javax.lang.model.element.Modifier.PUBLIC; import static javax.tools.Diagnostic.Kind.ERROR; +import com.facebook.common.logging.FLog; import com.facebook.infer.annotation.SuppressFieldNotInitialized; +import com.facebook.react.common.ReactConstants; import com.facebook.react.module.annotations.ReactModule; import com.facebook.react.module.annotations.ReactModuleList; import com.facebook.react.module.model.ReactModuleInfo; @@ -87,7 +89,15 @@ public class ReactModuleSpecProcessor extends AbstractProcessor { } TypeElement typeElement = (TypeElement) reactModuleListElement; - ReactModuleList reactModuleList = typeElement.getAnnotation(ReactModuleList.class); + + ReactModuleList reactModuleList = null; + try { + reactModuleList = typeElement.getAnnotation(ReactModuleList.class); + } catch (Exception ex) { + FLog.i( + ReactConstants.TAG, "Could not reactModuleList from typeElement.getAnnotation()", ex); + throw ex; + } if (reactModuleList == null) { continue;