'Error And Failed When Try To Use expo run:android React Native Expo

Could anyone figure out why when I build using expo run:android I got failed ?

This the detail error :

> Configure project :expo-file-system
WARNING: Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.
It will be removed in version 5.0 of the Android Gradle plugin.
For more information, see http://d.android.com/r/tools/update-dependency-configurations.html.

> Configure project :expo-structured-headers
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.

> Configure project :expo

Using expo modules
  - expo-application (4.0.2)
  - expo-constants (13.0.2)
  - expo-crypto (10.1.2)
  - expo-error-recovery (3.0.5)
  - expo-file-system (13.1.4)
  - expo-font (10.0.5)
  - expo-json-utils (0.2.1)
  - expo-keep-awake (10.0.2)
  - expo-manifests (0.2.4)
  - expo-modules-core (0.6.5)
  - expo-screen-orientation (4.1.2)
  - expo-sharing (10.1.1)
  - expo-splash-screen (0.14.2)
  - expo-sqlite (10.1.1)
  - expo-structured-headers (2.1.1)
  - expo-updates (0.11.6)
  - expo-web-browser (10.1.1)


> Configure project :react-native-reanimated
AAR for react-native-reanimated has been found
E:\Application\daastradingapp\node_modules\react-native-reanimated\android\react-native-reanimated-64-jsc.aar

> Task :react-native-reanimated:replaceSoTaskDebug FAILED

FAILURE: Build failed with an exception.

* Where:
Build file 'E:\Application\daastradingapp\node_modules\react-native-reanimated\android\build.gradle' line: 122

* What went wrong:
Execution failed for task ':react-native-reanimated:replaceSoTaskDebug'.
> Warning: Could not find file E:\Application\daastradingapp\android\app\build\tmp\libSo\jni\x86\libfbjni.so to copy.

* Try:
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.

* Get more help at https://help.gradle.org

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 https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 51s
569 actionable tasks: 6 executed, 563 up-to-date
E:\Application\daastradingapp\android\gradlew.bat exited with non-zero code: 1
Error: E:\Application\daastradingapp\android\gradlew.bat exited with non-zero code: 1
    at ChildProcess.completionListener (C:\Users\Dennis_Liu\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\spawn-async\src\spawnAsync.ts:65:13)
    at Object.onceWrapper (events.js:520:26)
    at ChildProcess.emit (events.js:400:28)
    at ChildProcess.cp.emit (C:\Users\Dennis_Liu\AppData\Roaming\npm\node_modules\expo-cli\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (internal/child_process.js:1055:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
    ...
    at spawnAsync (C:\Users\Dennis_Liu\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\spawn-async\src\spawnAsync.ts:26:19)
    at spawnGradleAsync (C:\Users\Dennis_Liu\AppData\Roaming\npm\node_modules\expo-cli\src\commands\run\android\spawnGradleAsync.ts:83:18)
    at assembleAsync (C:\Users\Dennis_Liu\AppData\Roaming\npm\node_modules\expo-cli\src\commands\run\android\spawnGradleAsync.ts:57:16)
    at actionAsync (C:\Users\Dennis_Liu\AppData\Roaming\npm\node_modules\expo-cli\src\commands\run\android\runAndroid.ts:143:9)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

Note:

I use expo bare worfklow



Solution 1:[1]

Finally solved the problem.

In Expo if with use a Native Module we cannot run in Expo Go.

If we want to publish to Expo Dashboard with Native Module

Use EAS Build.

Example :

Run eas build --platform android to build for Android.

Run eas build --platform ios to build for iOS.

Alternatively, you can run eas build --platform all to build for Android and iOS at the same time.

The complete documentation can be found in here :

EAS Documentation Expo

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dennis Liu