Assuming you're on 64-bit Ubuntu, this may be necessary:
sudo apt-get install libgl1-mesa-dev:i386 libgl1-mesa-dev
The nodejs and node-js legacy in the Ubuntu repos are flaky and not recommended, so remove them if they're installed; then
Run "android" at the command line to start the Android SDK manager, and install any updates. Also install the latest Android version (the highest API number), all components.
Next, start the Eclipse IDE that comes with the Android developer tools and create an AVD emulator (Windows/Android Virtual Device Manager). Use the default settings for a Nexus 4; Nexus 5 emulators fail to start, for some reason. This emulator will be available in Cordova to run your app. Set up the emulation based on the Android version you installed in the step above. Starting it the first time can take several minutes.
Now create a new project in Cordova at the command line:
cordova create test com.mholmes.test TestApp
Add the Android platform to the project:
cd test
cordova platform add android
and finally try building and running the project in the emulator:
cordova emulate android