Skip to content

[expo][Android] Fix compilation warnings#47286

Open
Wenszel wants to merge 6 commits into
mainfrom
@wenszel/expo/android-compilation-warnings
Open

[expo][Android] Fix compilation warnings#47286
Wenszel wants to merge 6 commits into
mainfrom
@wenszel/expo/android-compilation-warnings

Conversation

@Wenszel

@Wenszel Wenszel commented Jun 26, 2026

Copy link
Copy Markdown
Member

Why

Fixes the following warnings:

`packages/expo/android/src/main/java/expo/modules/ExpoModulesPackage.kt:34:16` - This declaration overrides a deprecated member but is not marked as deprecated itself. Add the '@Deprecated' annotation or suppress the diagnostic.
`packages/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt:22:8` - 'class ReactInstanceManager : Any' is deprecated. Deprecated in Java.
`packages/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt:102:16` - This declaration overrides a deprecated member but is not marked as deprecated itself. Add the '@Deprecated' annotation or suppress the diagnostic.
`packages/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt:102:43` - 'class ReactInstanceManager : Any' is deprecated. Deprecated in Java.
`packages/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt:103:21` - 'val reactInstanceManager: ReactInstanceManager' is deprecated. Deprecated in Java.
`packages/expo/android/src/main/java/expo/modules/fetch/ExpoFetchModule.kt:32:39` - 'constructor(reactContext: ReactContext): ForwardingCookieHandler' is deprecated. Use the default constructor.
`packages/expo/android/src/main/java/expo/modules/fetch/NativeResponse.kt:42:16` - This declaration overrides a deprecated member but is not marked as deprecated itself. Add the '@Deprecated' annotation or suppress the diagnostic.
`packages/expo/android/src/main/java/expo/modules/fetch/NativeResponse.kt:44:11` - 'fun deallocate(): Unit' is deprecated. Use sharedObjectDidRelease() instead.

How

  • Removed isNewArchitectureEnabled from ReactActivityDelegateWrapper and updated every call in the repo, per the TODO
  • Copied the deprecation annotation from ReactPackage to ExpoModulesPackage.createNativeModules()
  • Removed getReactInstanceManager, as the docs state: “Do not access ReactInstanceManager directly. This class is going away in the New Architecture. You should access ReactHost instead.”
  • Replaced deprecated ForwardingCookieHandler(reactContext) with ForwardingCookieHandler() in ExpoFetchModule
  • Replaced deprecated deallocate() with sharedObjectDidRelease() in NativeResponse, as deallocate is a no-op and sharedObjectDidRelease calls deallocate

Test Plan

Green CI

@expo-bot expo-bot added the contributor: internal PR author is a member, owner, or collaborator of the expo org label Jun 26, 2026

Wenszel commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Wenszel Wenszel changed the title ExpoModulesPackage.kt:34:16 This declaration overrides a deprecated member but is not marked as deprecated itself [expo] Fix Android compilation warnings Jun 26, 2026
@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Jun 26, 2026
@expo-bot

expo-bot commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

The Pull Request introduced fingerprint changes against the base commit: 5e1b80f

Fingerprint diff
[
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "../../packages/@expo/log-box",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid"
      ],
      "hash": "2521f2a27b23192c763aba6b84efb8c671254584"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "../../packages/@expo/log-box",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid"
      ],
      "hash": "e5b0c0e9ffef94444d7d289a1283268364bf7c7b"
    }
  },
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "../../packages/expo",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid",
        "expoConfigPlugins",
        "expoConfigPlugins",
        "rncoreAutolinkingAndroid",
        "rncoreAutolinkingIos"
      ],
      "hash": "c3fb7208e8039e3f65d9f0106746b50e45493e3f"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "../../packages/expo",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid",
        "expoConfigPlugins",
        "expoConfigPlugins",
        "rncoreAutolinkingAndroid",
        "rncoreAutolinkingIos"
      ],
      "hash": "46df7aef03d93def983b12d0c4e94f0904b77c53"
    }
  },
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "../../packages/expo-dev-launcher",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid"
      ],
      "hash": "56962a280d3ab0b409f51643966137cd5ee3ad67"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "../../packages/expo-dev-launcher",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid"
      ],
      "hash": "904c73fc1046972b77feefc53b775d015a71deb6"
    }
  },
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "../../packages/expo-dev-menu",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid"
      ],
      "hash": "a7c098e1cb5ad3f68a7653eb94bde396f465120c"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "../../packages/expo-dev-menu",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid"
      ],
      "hash": "89c87d56ad095ff5458a0b2323608597f08f52bd"
    }
  },
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "../../packages/expo-gl",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid"
      ],
      "hash": "1e111f57850931de2cf7cae98cd75f3662e58380"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "../../packages/expo-gl",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid"
      ],
      "hash": "f242f669ec9d5ce6705034abadb5b589618b48ff"
    }
  },
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "../../packages/expo-modules-core",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid",
        "expoAutolinkingIos"
      ],
      "hash": "4123cf9fc4f0d60df8a41da60026334ce32ddcd6"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "../../packages/expo-modules-core",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid",
        "expoAutolinkingIos"
      ],
      "hash": "869e279ca57fd47d5c375b6c6913f36df6a879c5"
    }
  },
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "android",
      "reasons": [
        "bareNativeDir"
      ],
      "hash": "8f99bd65aeedb9cd6797e24c9ad5b66df8bf35db"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "android",
      "reasons": [
        "bareNativeDir"
      ],
      "hash": "7a763cb5bd2af48a009b55a3cc65cb6e823fbba5"
    }
  },
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "node_modules/@shopify/react-native-skia",
      "reasons": [
        "rncoreAutolinkingAndroid"
      ],
      "hash": "405d98d51272d063c6876e7be93c5e392abf3cd7"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "node_modules/@shopify/react-native-skia",
      "reasons": [
        "rncoreAutolinkingAndroid"
      ],
      "hash": "3f9e1aacb7f75a36f2668ba943381096ba26eac4"
    }
  }
]

Generated by PR labeler 🤖

@Wenszel
Wenszel force-pushed the @wenszel/expo/android-compilation-warnings branch 3 times, most recently from c6b91e3 to dc9f5b8 Compare June 30, 2026 19:05
@Wenszel Wenszel changed the title [expo] Fix Android compilation warnings [expo][Android] Fix compilation warnings Jun 30, 2026
@Wenszel
Wenszel force-pushed the @wenszel/expo/android-compilation-warnings branch from dc9f5b8 to 8f87c3a Compare July 1, 2026 14:22
@expo-bot

expo-bot commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines.

I've found some issues in your pull request that should be addressed (click on them for more details) 👇

⚠️ Suggestion: Missing changelog entries


Your changes should be noted in the changelog, e.g.:
- [Android] Fix compilation warnings ([#47286](https://github.com/expo/expo/pull/47286) by [@Wenszel](https://github.com/Wenszel))
Read Updating Changelogs guide and consider adding an appropriate entry to the following changelogs:


Generated by ExpoBot 🤖 against 8f87c3a

@Wenszel
Wenszel marked this pull request as ready for review July 1, 2026 14:45
@Wenszel
Wenszel requested a review from lukmccall July 1, 2026 14:45
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Subscribed to pull request

File Patterns Mentions
docs/** @amandeepmittal
packages/expo/** @ide, @lukmccall, @brentvatne
packages/expo-updates/** @Kudo, @alanjhughes, @wschurman
packages/install-expo-modules/** @Kudo

Generated by CodeMention

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot: fingerprint changed bot: suggestions ExpoBot has some suggestions contributor: internal PR author is a member, owner, or collaborator of the expo org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants