1

react-native run-android crashed with below error, things were working fine. Any help would be greatly appreciated.

npx react-native run-android

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 1010 file(s) to forward-jetify. Using 8 workers... info JS server already running. info Installing the app... Starting a Gradle Daemon (subsequent builds will be faster)

Task :react-native-gesture-handler:compileDebugJavaWithJavac

Task :react-native-image-crop-picker:compileDebugJavaWithJavac

Task :react-native-screens:compileDebugJavaWithJavac

Task :app:compressDebugAssets FAILED 126 actionable tasks: 126 executed Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:compressDebugAssets'.

Multiple task action failures occurred: A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/AntDesign.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/Entypo.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/EvilIcons.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/Feather.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/FontAwesome.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/FontAwesome5_Brands.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/FontAwesome5_Regular.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/FontAwesome5_Solid.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/Fontisto.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/Foundation.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/Ionicons.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/MaterialCommunityIcons.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/MaterialIcons.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/Octicons.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/SimpleLineIcons.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/Zocial.ttf' collided

  • 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

BUILD FAILED in 7m 15s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:compressDebugAssets'.

Multiple task action failures occurred: A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/AntDesign.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/Entypo.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/EvilIcons.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/Feather.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/FontAwesome.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/FontAwesome5_Brands.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/FontAwesome5_Regular.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/FontAwesome5_Solid.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/Fontisto.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/Foundation.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/Ionicons.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/MaterialCommunityIcons.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/MaterialIcons.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/Octicons.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/SimpleLineIcons.ttf' collided A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > Entry name 'assets/fonts/Zocial.ttf' collided

  • 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

BUILD FAILED in 7m 15s

at makeError (E:\x\uipoc\day2\x\node_modules\execa\index.js:174:9)
at E:\x\uipoc\day2\x\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (E:\x\uipoc\day2\x\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
at async Command.handleAction (E:\x\uipoc\day2\x\node_modules\@react-native-community\cli\build\index.js:186:9)

info Run CLI with --verbose flag for more details.

2
  • im assuming your trying to add fonts? how about try deleting nodemodules and npm install and cd ios and pod install Commented Jul 1, 2021 at 6:29
  • 1) at this i am trying to just bring the app up, i am using android 2) i have already cleaned node-modules, ,gradle , ran npm install Commented Jul 1, 2021 at 6:32

1 Answer 1

2

Troubleshooting

The icons show up as a crossed out box on Android

  1. Make sure you've copied the font to android/app/src/main/assets/fonts.
  2. Delete the build folder with rm -rf android/app/build.
  3. Recompile the project.

As mentioned in Troubleshooting section

Sign up to request clarification or add additional context in comments.

5 Comments

which fonts to copy? and why should I do it? android/app/src/main/assets/fonts already has those fonts, deleting the build folder doesn't help
you just need to read the documentation here it is Copy the contents in the Fonts folder to android/app/src/main/assets/fonts (note lowercase fonts folder). available here github.com/oblador/react-native-vector-icons#option-manually
I have those fonts already there, the issue is not about missing fonts but about duplicating issue: android\app\build\intermediates\ReactNativeVectorIcons\fonts\AntDesign.ttf: Resource and asset merger: Duplicate resources
yes you need to remove them if you added them manually as well

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.