From aeff0ed43eb77b2ecbbaeb0cb8601ac9616284b7 Mon Sep 17 00:00:00 2001 From: igaboo Date: Thu, 16 Apr 2026 02:41:40 -0700 Subject: [PATCH 1/2] fix: android build on Expo SDK 55 / RN 0.83 / Kotlin 2.x 1. isNewArchitectureEnabled() defaults to true when newArchEnabled property is absent (removed in RN 0.83 since new arch is the only option). 2. MenuView.kt mHitSlopRect setter uses `field` keyword instead of super.hitSlopRect (rejected by K2 compiler) and recursive self- assignment. Closes #1167, Fixes #1058 Related: #1179, #1186, #1187 Co-Authored-By: Claude Opus 4.6 (1M context) --- android/build.gradle | 5 ++++- android/src/main/java/com/reactnativemenu/MenuView.kt | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index f1d2631f..0a4cf2ef 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -15,7 +15,10 @@ buildscript { } def isNewArchitectureEnabled() { - return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true" + if (rootProject.hasProperty("newArchEnabled")) { + return rootProject.getProperty("newArchEnabled") == "true" + } + return true } apply plugin: "com.android.library" diff --git a/android/src/main/java/com/reactnativemenu/MenuView.kt b/android/src/main/java/com/reactnativemenu/MenuView.kt index c45f5cc8..16fb9946 100644 --- a/android/src/main/java/com/reactnativemenu/MenuView.kt +++ b/android/src/main/java/com/reactnativemenu/MenuView.kt @@ -25,8 +25,7 @@ class MenuView(private val mContext: ReactContext) : ReactViewGroup(mContext) { private var mGestureDetector: GestureDetector private var mHitSlopRect: Rect? = null set(value) { - super.hitSlopRect = value - mHitSlopRect = value + field = value updateTouchDelegate() } From 31206847a6e39f2fa7fb9d2410c4506db247e72e Mon Sep 17 00:00:00 2001 From: igaboo Date: Thu, 18 Jun 2026 19:44:43 -0700 Subject: [PATCH 2/2] fix: preserve legacy architecture opt-out --- android/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 0a4cf2ef..81ec0d4b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -15,10 +15,10 @@ buildscript { } def isNewArchitectureEnabled() { - if (rootProject.hasProperty("newArchEnabled")) { - return rootProject.getProperty("newArchEnabled") == "true" + if (getReactNativeMinorVersion() >= 82) { + return true } - return true + return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true" } apply plugin: "com.android.library"