Can VS Code run on Android?

AndroidVisual Studio-Code

Android Problem Overview


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

Android Solutions


Solution 1 - Android

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 - Android

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 - Android

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 - Android

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 - Android

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

Extensions

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
}

Solution 6 - Android

There is a 3rd party debugger in the works, it's currently in preview, but you can install the debugger Android extension in VSCode right now and get more information on it here:

https://github.com/adelphes/android-dev-ext

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDmytro KhmaraView Question on Stackoverflow
Solution 1 - AndroidDaniel ImmsView Answer on Stackoverflow
Solution 2 - AndroidTomView Answer on Stackoverflow
Solution 3 - AndroidAriView Answer on Stackoverflow
Solution 4 - AndroidSam DentyView Answer on Stackoverflow
Solution 5 - AndroidjdONeillView Answer on Stackoverflow
Solution 6 - AndroidBryan BryceView Answer on Stackoverflow