Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android app development, with Visual Studio Code

I want to create and build mobile apps using Visual Studio Code.

I have the environment for Node.js, Java, and Python installed. I don’t have any idea on how to use these to create and build mobile apps. I can't install Android Studio for some reasons, and I don't know how to get the Android SDK without installing Android Studio. I can only use Visual Studio Code.

How could I still create and build android apps using Visual Studio Code?


Related: How to develop Android apps without Android Studio, but with Visual Studio Code

like image 799
WOWOW Avatar asked Nov 29 '25 09:11

WOWOW


1 Answers

It may be helpful to use the tips from this Reddit thread. Here one of the participants talks about his experience of developing in Visual Studio Code and how to set up his editor. Here are some excerpts from that comment:

  • Install Java JDK (presumably you will have one - if not, openjdk-8 will do)
  • Download command line SDK tools
  • Unzip into ~/android
  • Configure $ANDROID_HOME and add the tools to your $PATH
  • Finally, sdkmanager will do the rest, you will probably want to do sdkmanager --install "platform-tools" "platforms;android-29" "build-tools;29.0.2" "emulator" for emulating and building for most of the hardware in the wild.

Also this comment mentions environment variables:

Some useful environment variables you might want to set (put these in > your .bashrc or .bash_aliases - or if you're on Windows, edit the > system environment variables from the System dialog by right clicking My Computer):

  • export ANDROID_HOME=$HOME/android
  • export PATH=$ANDROID_HOME/cmdline-tools/bin:$PATH
  • export PATH=$ANDROID_HOME/emulator:$PATH
  • export PATH=$ANDROID_HOME/platform-tools:$PATH

In addition, a comment in the same thread mentions extensions for Visual Studio Code:

  • Android Id: adelphes.android-dev-ext (Android debugging support for VS Code)
  • Android iOS Emulator Id: DiemasMichiels.emulate (Run Android emulator and iOS simulator easily from VScode)
  • Android System Tools Id: flimberger.android-system-tools (Syntax support for file formats used in Android system development)
like image 95
m3r1v3 Avatar answered Dec 01 '25 21:12

m3r1v3