Can VS Code run on Android? [closed]

Does anybody know about plans of MS to support running VS Code so it can run on Android OS?


Solution 1:

Running VS Code on Android is not possible, at least until Android support is implemented in Electron. This has been rejected by the Electron team in the past, see electron#562

Visual Studio Codespaces and GitHub Codespaces an upcoming services that enables running VS Code in a browser. Since everything runs in a browser, it seems likely that mobile OS' will be supported.

It's also possible to run VS Code on Android by installing Linux on your Android device as described in this answer.

Solution 2:

I don't agree with the accepted answer that the lack of electron prevents VSC on Android.

Electron is really the desktop equivelent of projects like Apache Cordova or Adobe PhoneGap (but Electron is much less efficient and will presumably give way to solutions much closer to Cordova/PhoneGap when possible - it is already being worked on eg. here.)

API's would need to be mapped from their electron equivelents, and many of the plug-ins will have their own issues (but Android is reasonably flexible about allowing stuff like Python compared to iOS) so it is doable.

On the other hand, the demand for an Android version of VSC probably comes from people using the new Chromebooks that support Android, and there is already a solution for ChromeOS using crouton, available here.

Solution 3:

There is a browser-based application that allows you to develop on a browser on your Android or any other device in a VSC-like environment. Check it out here:

https://stackblitz.com/

Edit: This is not the exact VSC implementation and it does not have all the features of VSC, such as extensions. It's just a VSC-like environment.

Solution 4:

To date, there isn't a native VS Code editor for android, but projects do exist like Microsoft/monaco-editor which aim to provide a native experience in the browser.

CodeSandbox is a sophisticated online editor built around Monaco

Solution 5:

The accepted answer is correct as asked, below answers the opposite question of developing Android on VS Code.

Extensions

  • Android : https://github.com/adelphes/android-dev-ext
  • Emulator: https://github.com/DiemasMichiels/Emulator

Ultimately you can automate building and running your app on a device emulator by adding the function below to your $PATH and running runDebugApp <module> <start activity> from the integrated terminal:

# run android app
# usage runDebugApp [module] [fully qualified start activity com.package/com.package.MainActivity]
function runDebugApp(){
  ./gradlew -offline :"$1":installDebug && adb shell am start "$2" && adb logcat -d > logcat.log
}