Tuesday, July 9, 2019

Task: react-native-gesture-handler:compileDebugJavaWithJavac FAILED | React-Native | Release 0.60.0 |

Error:
Task :react-native-gesture-handler:compileDebugJavaWithJavac FAILED

import android.support.v4.util.Pools;




react-native | Release 0.60.0



Step #1 react-navigation

Install the react-navigation package in your React Native project.

yarn add react-navigation
yarn add react-native-gesture-handler

Step #2 react-native link 

Note: 
now it doesn't work with react-native 0.60.0
because.... 

react-native link is an automatic way for installing native dependencies.



Step #3 react-native upgrade to 0.60.0


Link all native dependencies to unLink it:
react-native unlink react-native-gesture-handler



Step #4 How do you that react-navigation in react-native

npm install --save-dev jetifier
npx jetify
react-native run-android


Step #5 react-native-vector-icons
Install
yarn add react-native-vector-icons
npx jetify

For Android add this line to android/app/build.gradle


apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"


For IOS add this to ios/projectname/Info.plist

<key>UIAppFonts</key>
<array>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>Octicons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Zocial.ttf</string>
</array>

Note:- don't Reload because it may not be works, need to re-run again like below run command.
react-native run-android



Thanks :)








No comments:

Post a Comment