Cannot load library: reloc_library[1285]: cannot locate ‘rand’

This happens if you’ve built your native components with the android-21 target, but are trying to run it on a device with an older Android version. Unless you take very special care, you can’t run binaries built with the android-21 target on older devices. For basic C functions, it shouldn’t matter which target version between android-3 and android-20 you use, it should work on all of them, but if you use android-21 it only works on that version and newer.

See https://stackoverflow.com/a/27093163/3115956 for more details on this issue.

Leave a Comment