Skip to content

Fix Android build failure from long-press shortcuts feature#6038

Merged
peachbits merged 1 commit into
developfrom
jon/fix-android-longpress-build
Jun 17, 2026
Merged

Fix Android build failure from long-press shortcuts feature#6038
peachbits merged 1 commit into
developfrom
jon/fix-android-longpress-build

Conversation

@j0ntz

@j0ntz j0ntz commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

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 bundled ExpoAppIconModule.setIcon returns mixed types: null, the icon name (String?), and false (Boolean) in its catch block. Expo's inline fun <reified R> Function(...) then infers R as the intersection Comparable<...> & Serializable. Kotlin 2.3.20 (pinned in android/build.gradle for zcash-android-sdk) promotes "reified type parameter inferred to intersection type" from a warning to a hard error, so :expo-quick-actions:compileDebugKotlin fails. The package was written against an older Kotlin where this was only a warning.

Fix: extend the existing expo-quick-actions patch to unify the error-path return to null, so every branch of setIcon returns String? (a single reifiable type). Edge does not use the app-icon API (only the shortcuts API via QuickActions.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.yml only 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):

  • Before: ./gradlew :app:assembleDebug fails at :expo-quick-actions:compileDebugKotlin.
  • After: ./gradlew :app:assembleDebug reaches BUILD SUCCESSFUL and produces app-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 existing patch-package patch for expo-quick-actions@5.0.0.

On Android, ExpoAppIconModule.setIcon previously returned false on error while other paths returned String? / null, which made Expo’s reified Function infer an intersection type. Kotlin 2.3 (pinned for Zcash) treats that as a compile error, so :expo-quick-actions:compileDebugKotlin failed. The patch changes the catch branch to return 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.

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.
@peachbits peachbits force-pushed the jon/fix-android-longpress-build branch from a85105b to 549aba3 Compare June 17, 2026 05:35
@peachbits peachbits enabled auto-merge June 17, 2026 05:37
@peachbits peachbits merged commit d943332 into develop Jun 17, 2026
7 checks passed
@peachbits peachbits deleted the jon/fix-android-longpress-build branch June 17, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants