eas build android fails due to com.facebook.react.module.annotations missing

I recently updated to expo SDK 44 and now I’m getting below error when trying to build for android using eas-cli.
My eas-cli@0.46.0

Task :react-native-async-storage_async-storage:compileReleaseJavaWithJavac FAILED
[stderr] /root/workingdir/build/node_modules/@react-native-async-storage/async-storage/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageModule.java:27: error: package com.facebook.react.module.annotations does not exist
[stderr] import com.facebook.react.module.annotations.ReactModule;
[stderr] ^
[stderr] /root/workingdir/build/node_modules/@react-native-async-storage/async-storage/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageModule.java:35: error: cannot find symbol
[stderr] @ReactModule(name = AsyncStorageModule.NAME)
[stderr] ^
[stderr] symbol: class ReactModule
[stderr] Note: /root/workingdir/build/node_modules/@react-native-async-storage/async-storage/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageModule.java uses or overrides a deprecated API.
[stderr] Note: Recompile with -Xlint:deprecation for details.
[stderr] Note: /root/workingdir/build/node_modules/@react-native-async-storage/async-storage/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStoragePackage.java uses unchecked or unsafe operations.
[stderr] Note: Recompile with -Xlint:unchecked for details.
[stderr] 2 errors
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ‘:react-native-async-storage_async-storage:compileReleaseJavaWithJavac’.
[stderr] > Compilation failed; see the compiler error output for details.
[stderr] * Try:
[stderr] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 4m 12s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See Command-Line Interface
232 actionable tasks: 232 executed
Error: Gradle build failed with unknown error. Please see logs for the “Run gradlew” phase.

Hey @haravanapps, a good approach when encountering a specific error is to throw it in Google. I did and found this post [Solved] async storage [Android] Deprecated Gradle features making it incompatible with Gradle 6.0

Thank for quick response, i saw the that post say, cleaned up gradle may be can resolve it.
in expo eas, how can it do that ?

I upgrade lastest version asynce-store, and eas build success

1 Like

I updated to latest version but still not working… Any idea ?