Skip to main content

Featured post

How to Insert line break in Text component in React Native

Hi, I was developing an application in react native.I have to handle lots of text data in this small react native application.I have used  Text component in react native many times. While working on this application,i had a requirement to display some text content with line breaks.I will explain it clearly with an example.I want to display a text as shown below  Welcome Please subscribe my channel I wrote react native code as shown below <View> <Text> Welcome Please subscribe my channel </Text> <View> When i run these lines of code,It will display text as shown below Welcome Please subscribe my channel   - instead of displaying in two lines with line break,it displays in a single line.So i have to find a solution to insert line break in Text component in React Native.After lots of research,i found a clean solution as shown below <View> <Text> Welcome{"\n"} Please subscribe my channel </Text> <View> Here ...

Execution failed for task ':react-native-reanimated:externalNativeBuildDebug' solved

When i was building a react native project in android studio,i got an error as shown below




Execution failed for task ':react-native-reanimated:externalNativeBuildDebug'.

> Build command failed.

  Error while executing process C:\Users\Administrator\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\ninja.exe with arguments {-C D:\Trivia\FrontEnd\node_modules\react-native-reanimated\android\.cxx\cmake\debug\x86 reanimated}

 ninja: Entering directory 


I tried many methods to solve the issue.But none of the solved my  error in building android app in react native project.

I will explain the methods which i tried alreday before reach at correct solution

  1. Deleted node_modules folder  and package-lock.json file and executed npm install command again
  2. using jetifier npm package to solve the issue
  3. Update the react-native-reanimated npm package to another version


But later i reached at the solution

i executed below  the command on my VS Code terminal

cd android 

./gradlew clean

npm start 


At this time ,react native project started successfully.I did gradle sync and build the android source code without any error and open the app on simulator on android studio

So we soled Execution failed for task ':react-native-reanimated:externalNativeBuildDebug' error which occurs while building android project 


Thanks