Yurij Mikhalevich
March 13, 2021

Running tfjs-react-native in Android Emulator

You are developing a react-native app with Tensorflow JS? Then you may have tried using the tfjs-react-native backend in Android SDK Emulator only to find that it doesn’t work.

This happens because tfjs-react-native requires GLES 3 / WebGL 2. You can enable it in Android SDK Emulator via:

echo "GLESDynamicVersion = on" >> ~/.android/advancedFeatures.ini

I tested this only under Linux. Your host GPU should support at least OpenGL ES 3.2; you can check if it does via:

sudo apt install mesa-utils
glxinfo | grep 'version.*OpenGL'
Builds the future at Lightning AI, creator of the Move Fast and Break Things community of software engineers, DeepLearning.AI mentor, creator of rclip, writes about tech, software engineering, books, what to watch, and beyond, practices creative writing and captures moments through photography
This post is tagged with software engineering. Grab the software engineering RSS feed or the main RSS feed to get future posts.