eas-cli: Gradle error related to @react-native-async-storage/async-storage
Build/Submit details page URL
https://expo.dev/accounts/mthaak/builds/0c6075eb-2daa-44e2-abf9-bfc48fcb02e5
Summary
EAS build (eas build -p android) fails due to a Gradle error related to @react-native-async-storage/async-storage. I just cannot figure it out. I tried downgrading that package and Googling the solution. However, the strange thing is that expo build:android -t apk is working for me with no problem.
Managed or bare?
Managed
Environment
EAS CLI 0.42.4 environment info: System: OS: Windows 10 10.0.19042 Binaries: Node: 12.18.3 - C:\Program Files\nodejs\node.EXE npm: 6.14.6 - C:\Program Files\nodejs\npm.CMD Utilities: Git: 2.25.0. npmPackages: expo: ^44.0.0 => 44.0.2 react: ^17.0.2 => 17.0.2 react-dom: ^17.0.2 => 17.0.2 react-native: https://github.com/expo/react-native/archive/sdk-44.0.0.tar.gz => 0.64.3 react-native-web: ^0.17.5 => 0.17.5 Project workflow: managed
Error output
[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
> Task :react-native-async-storage_async-storage:compileReleaseJavaWithJavac FAILED
[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
[stderr] --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 3m 34s
Reproducible demo or steps to reproduce from a blank project
Clone and build https://github.com/mthaak/whatshouldiweartoday
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 24 (2 by maintainers)
Hi @byCedric ! Thanks for looking at this.
This is my first time using Typescript and it appears that all along I have not actually been using it properly. I only added the annotations to assist my development and at no point did I check them or use
tsc. So you are right there are a lot of Typescript errors. I am going to need a bit of time to sort them out.Maybe you can still build the repo as if it’s normal Javascript? I don’t know
Anyway, it’s probably not worth diving into this issue until I have sorted out the Typescript errors right?