Skip to content

[Android] assembleRelease keeps using old JS bundle despite --reset-cache and gradlew clean #54775

@changmen1

Description

@changmen1

Description

When I was packaging React Native, I first cleared the Metro cache using npx react-native start --reset-cache, then CD-ROM the Android version and ran ./gradlew clean followed by ./gradlew assembleRelease --no-build-cache to package it. The app I'm packaging now contains the old code. I've tried deleting and reinstalling the app on my phone, and I've also deleted the build folder in the Android version and the build file in the app, cleared the cache again, and then packaged it again, but the problem keeps recurring.

Steps to reproduce

I couldn't find the same question online, so I came here hoping someone would see this and help me. Thank you everyone.

React Native Version

0.82.1

Affected Platforms

Runtime - Android, Build - Windows

Output of npx @react-native-community/cli info

1.npx react-native start --reset-cache
2.cd android ./gradlew clean
3. ./gradlew assembleRelease
4. It's still the old js package

Stacktrace or Logs

no

MANDATORY Reproducer

https://github.com/changmen1

Screenshots and Videos

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions