ReactNativeException

React Native Android Build Failure : failed to find Build Tools revision 26.0.1 or failed to find Build Tools revision 23.0.1

React Native Android Build Failure : failed to find Build Tools revision 26.0.1 or failed to find Build Tools revision 23.0.1

If you are facing following exception

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> A problem occurred configuring project ':react-native-vector-icons'.
   > failed to find Build Tools revision 26.0.1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2 mins 44.097 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

Or the exception may be for Build Tools revision 23.0.1

Then Kindly install build tools versions from your android studio. 

Go to android studio Preferences, select second tab SDK Tools, Install respective build tool version. Do not forget to check mark Show Package Details in the dailog box. Refer below screenshot

ReatNativeAndroidExceptionBuildToolsrevision

ReatNativeAndroidExceptionBuildToolsrevision

 

ReactNative Exception: TabNavigator expected a component class, got [object, object]

ReactNative Exception: TabNavigator expected a component class, got [object, object]

Possible cases to get ReactNative Error: ReactNative Exception: TabNavigator expected a component class, got [object, object] .

  1. When you are using a component with all small letters or a component that begin with small letter, Example

 

const FooterTabNavigation = TabNavigator(
  {
    Home: {
      screen: ({ screenProps, navigation }) => <homePage navigation={navigation} />
    },
 });

 

Solution : Use Capitalised class names, like HomePage navigation={navigation}

2. Another case is if by any chance you are using <div> component in ReactNative this exception might occur.
Example

const FooterTabNavigation = TabNavigator(
  {
    Home: {
      screen: ({ screenProps, navigation }) =&gt; &lt;homePage navigation={navigation} /&gt;
    },
    TestScreen: {
      screen: ({ screenProps, navigation }) =&gt; &lt;div /&gt;
    }
});

 

Solution : Do not use div tag in ReactNative instead use View

Explore More About React Native : React Native FlatList And Pagination