简体   繁体   中英

react-native run-android crashed

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 n ame '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 n ame '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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM