Making apps with electron for android


Is it possible to use electron to create .apk files like one would create an executable file for windows, os x or linux?

If not, what are some alternatives?


Maybe React Native is what you need …( ゚Д゚)ノ⌒React Native


It should be possible with a combination of the child_process functions (e.g exec, execFile, spawn) and the Android SDK. Just use the child_process functions to execute the command for creating the .apk file.

apk build command: “ant -Dsdk.dir= debug” (old command based on eclipse) .

Check the Android SDK documentation for the latest information on building the apk from the command line:


Render process (index.html)

<script type="text/javascript">
    var ipc = require('ipc');
    ipc.send('create_apk', 1);

	ipc.on('create_apk_response', function(arg) {
 		document.getElementById('div').innerHTML = "apk file name: " + arg;

main process (main.js)

var ipc = require('ipc');
ipc.on('create_apk', function(event, arg) {
  var e = require('child_process');
  e.exec('ant -Dsdk.dir='+ ANDROID_SDK_PATH +' debug', function(err,stdout, stderr) {
  // process stdout, stderr printouts and get the apk filename if successfull
  // return the apk file name in stdout
  event.sender.send('create_apk_response', stdout);


It only works on os x :confused:


This must be a thing. I electron updated to alow android app development it would open a whole new world for developers and would make electron the go to development platform for practically anything.


With termux we can install nodejs on android
Could it be possible to wrap in a unique app, termux, nodejs a server and a webview which comunicates with the server to call the functions of nodejs? In this way we would use the node library instead of cordova plugin and then major portable code.


Unfortunately according to porting electron would be nearly impossible. The underlying APIs are very different. Remember electron is a native C++/Python app, it uses nodejs but that’s not the foundation.