Repository navigation
Autolinking android regression #55653
Description
Activity
- addedImpact: RegressionDescribes a behavior that used to work on a prior release, but stopped working recently.Describes a behavior that used to work on a prior release, but stopped working recently.Platform: AndroidAndroid applications.Android applications.
on Feb 20, 2026 We were able to unblock this by explicitly using fully qualified class names in packageInstance inside react-native.config.js.
Instead of:
packageInstance: [
'new RNAppsFlyerPackage()',
'new PCAppsFlyerPackage()',
].join(',\n'),we changed it to:
packageInstance: [
'new com.appsflyer.reactnative.RNAppsFlyerPackage()',
'new com.appsflyer.reactnative.PCAppsFlyerPackage()',
].join(',\n'),After cleaning and rebuilding Android, the project compiles successfully on 0.84.0.
This works because it bypasses the missing import resolution in the generated
PackageList.java.Leaving this here in case it helps others until a proper fix lands upstream.
For me, changing both
new RNAppsFlyerPackage()->new com.appsflyer.reactnative.RNAppsFlyerPackage()
and
new PCAppsFlyerPackage()->new com.appsflyer.reactnative.PCAppsFlyerPackage()caused
PackageList.javato contain a wrong path (so, the build would keep failing, as expected):// react-native-appsflyer new com.appsflyer.reactnative.com.appsflyer.reactnative.RNAppsFlyerPackage(), <-- notice wrong path here new com.appsflyer.reactnative.PCAppsFlyerPackage(),So, the final patch that got it working for me was this:
diff --git a/node_modules/react-native-appsflyer/react-native.config.js b/node_modules/react-native-appsflyer/react-native.config.js index 0f30744..9b1464d 100644 --- a/node_modules/react-native-appsflyer/react-native.config.js +++ b/node_modules/react-native-appsflyer/react-native.config.js @@ -10,7 +10,7 @@ module.exports = { ].join('\n'), packageInstance: [ 'new RNAppsFlyerPackage()', - 'new PCAppsFlyerPackage()', + 'new com.appsflyer.reactnative.PCAppsFlyerPackage()', ].join(',\n'), }, },react-native: "0.84.0"
react-native-appsflyer: "^6.17.8"I'm aware of these patches, but from what I'm seeing this looks like an extraction issue. The Gradle plugin now either requires a single import or handles import definitions differently. If that's intentional, it's a breaking change that should be clearly communicated to library maintainers. If it's not intentional, then it's likely a regression, especially since the imports are being defined in two different ways.
Yup this seems like a bug. Feel free to send a PR to fix it. We do have tests in place inside RNGP so should be an easy fix (you could ask an agent to do it for you).
Once you're done please tag me in the PR.
Also which library in the ecosystem is importing more than one package?
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
- addedStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
on Sep 2, 2026 This issue is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.
- removedStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
on Sep 2, 2026
Description
In React Native 0.84, the autolinking Gradle plugin (
GeneratePackageListTask.kt) fails to generate correct fully qualified class names (FQCNs) when a library registers multiple React packages viareact-native.config.js. Only the first package gets resolved; subsequent packages are emitted as bare class names with no import or qualification, causing a compilation error.@react-native/gradle-plugin—GeneratePackageListTask.ktreact-native-appsflyer@6.17.8I think the bug was introduced here https://github.com/facebook/react-native/pull/54736/changes
Steps to reproduce
Any library that registers multiple packages in its
react-native.config.jswill trigger this:Expected generated
PackageList.javaActual generated
PackageList.javaReact Native Version
0.84.0
Affected Platforms
Other (please specify), Runtime - Android
Output of
npx @react-native-community/cli infoStacktrace or Logs
MANDATORY Reproducer
https://github.com/Summys/ReproducerAutolinking
Screenshots and Videos
No response