(Android-only) Sets the elevation of a view, using Android's
underlying elevation API. This adds a drop shadow to the item and
affects z-order for overlapping views. Only supported on Android 5.0+,
has no effect on earlier versions.
elevation will go into the style property and it can be implemented like so.
I had the same problem shadow/elevation not showing on Android with elevation:2. Then i noticed that the view element is fool width, so I added margin:2 to the view element and elevation properly appeared.
Also i'd like to add that if one's trying to apply shadow in a TouchableHighlight Component in which child has borderRadius, the parent element (TouchableHighlight) also need the radius set in order to elevation prop work on Android.
Generating shadows for a circle, react native, android
Based on the answers here, and on text that I found in github (react-native-shadow), I made few tests and thought that some people may find the following helpful.
The tests are on a circular button
The environment: Windows 10 PC, react-native using react-native-shadow (which doesn't work well for a circle) and react-native's elevation parameter (https://facebook.github.io/react-native/docs/view-style-props#elevation) with different values, running on an android emulator (genymotion)
This enables almost identical shadow in Android as in iOS
No need to use elevation, works with the same shadow parameters of iOS (shadowColor, shadowOpacity, shadowRadius, offset, etc.) so you don't need to write platform specific shadow styles
The react-native-shadow library is already mentioned in the answers, but it seems to be abandoned for several years.
A modern alternative, which solved my issue with consistent shadows across both iOS and Android was react-native-shadow-2.
EDIT: I ended up using the native shadow solutions (and elevation for Android). According to the docs, Android API 28 and above supports shadowColor on elevated elements and it works well for my case.