Fix Android build failure from long-press shortcuts feature#6038
Merged
Conversation
peachbits
approved these changes
Jun 17, 2026
expo-quick-actions 5.0.0's bundled ExpoAppIconModule.setIcon returns mixed types (String? and Boolean), so expo's reified Function() infers an intersection type for R. Kotlin 2.3.20, pinned for zcash-android-sdk, treats reifying an intersection type as a hard error, breaking :expo-quick-actions:compileDebugKotlin. Unify the error-path return to null so all branches return String?. Edge does not use the app-icon API, so this is behavior-neutral for the app. Extend the existing expo-quick-actions patch with this Android fix.
a85105b to
549aba3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
No visual changes. This is an Android-native build fix only.
Description
Asana task
Asana: https://app.asana.com/1/9976422036640/project/1213880789473005/task/1215776835822945
PR #6001 ("add home screen long-press shortcuts via expo-quick-actions") builds on iOS but broke the Android build.
Root cause:
expo-quick-actions@5.0.0's bundledExpoAppIconModule.setIconreturns mixed types:null, the icon name (String?), andfalse(Boolean) in its catch block. Expo'sinline fun <reified R> Function(...)then infersRas the intersectionComparable<...> & Serializable. Kotlin2.3.20(pinned inandroid/build.gradleforzcash-android-sdk) promotes "reified type parameter inferred to intersection type" from a warning to a hard error, so:expo-quick-actions:compileDebugKotlinfails. The package was written against an older Kotlin where this was only a warning.Fix: extend the existing
expo-quick-actionspatch to unify the error-path return tonull, so every branch ofsetIconreturnsString?(a single reifiable type). Edge does not use the app-icon API (only the shortcuts API viaQuickActions.setItems/useQuickActionCallback), so this is behavior-neutral for the app, and the long-press shortcuts feature is unchanged.GitHub CI does not build Android (
pr-checks.ymlonly blocks WIP PRs), so this regression was not caught there.Testing
Verified locally with a full Android build (Android SDK + NDK 27.1.12297006, Kotlin 2.3.20):
./gradlew :app:assembleDebugfails at:expo-quick-actions:compileDebugKotlin../gradlew :app:assembleDebugreachesBUILD SUCCESSFULand producesapp-debug.apk.verify-repo.sh(install, prepare, jest) passes. iOS is unaffected (the iOS hunk of the patch is unchanged by this PR).Note
Low Risk
Build-only node_modules patch with no app code changes; shortcuts behavior is unchanged because the app does not use the app-icon API.
Overview
Fixes the Android build broken after home screen long-press shortcuts (
expo-quick-actions) by extending the existingpatch-packagepatch forexpo-quick-actions@5.0.0.On Android,
ExpoAppIconModule.setIconpreviously returnedfalseon error while other paths returnedString?/null, which made Expo’s reifiedFunctioninfer an intersection type. Kotlin 2.3 (pinned for Zcash) treats that as a compile error, so:expo-quick-actions:compileDebugKotlinfailed. The patch changes the catch branch toreturn null, unifying the return type. Edge only uses the shortcuts API (QuickActions.setItems/useQuickActionCallback), not app-icon switching, so behavior for the app is unchanged.Adds an Unreleased CHANGELOG entry documenting the fix.
Reviewed by Cursor Bugbot for commit 549aba3. Bugbot is set up for automated code reviews on this repo. Configure here.