Skip to content

itssimmons/apk-template

Repository files navigation

Android Studio wo/ using Android Studio 📱

Simple template for Android Studio Projects for be used in other enviroments

Requirements

  1. Android SDK and all its set up
  2. JDK
  3. Code editor
  4. Know how to use the terminal (Recomendation)
  5. Preferably use a physical device (Recomendation)
  6. Android Visualizer (way to see this stuff you're designing in the XML). (Optional)

How to Use

To get started, click here > Use this template

Visual Studio Code way

  1. Install Android (by adelphes)
  2. Install Java Support Language Support for Java(TM) by Red Hat

then
Open the terminal and put this inside

.\gradlew build
.\gradlew assembleDebug

And finally compile your apk.
⚠️WARN: Each time you wanna compile it, before, you must have to run the second comand.

(Neo)Vim way

Put this in your init.vim

Plug "hsanson/vim-android"

With COC install Java. (I personally recommend this way because with LSP you need to do things that coc do more easier)
:CocInstall coc-java

CMD way

In your terminal build the project then just install the apk and open it.

.\gradlew build
.\gradlew installDebug

⚠️WARN: I think it's a bit obvious, but before all this, you should link your devices with ADB

  1. Connect your device
  2. Run adb devices
  3. And yeah, that's it

SDK set up

  • Install SDK Tools package https://developer.android.com/studio
  • Go to the bottom of the page, where it says "Command line tools only" download the cmdline-tools of your preference, (win in my case).
  • Unzip the downloaded package, create a folder named "AndroidSDK" or however you want, and put the unzipped folder into it.
  • Into cmdline-tools create other folder named "tools" and put the content of cmdline-tools into.
  • Open a terminal on the root folder for then run this:
cd .\cmdline-tools\tools\bin
.\sdkmanager.bat "platform-tools" "build-tools;30.0.2" "platforms;android-25"

"platforms;android-25" is Android 7 change it for whatever you want SDK Platform Release Notes

  • Replace the created folder "tools" with this version tools@25.2.5 it's just for you can use the android.bat, for me is useful, downloading or not it's up to you.
  • Set the enviroments variables:

    Account variables:
Variable Values
ANDROID_HOME C:\AndroidSDK
ANDROID_SDK_ROOT C:\AndroidSDK

PATH variables:

%ANDROID_HOME%\cmdline-tools\tools\bin
%ANDROID_HOME%\emulator
%ANDROID_HOME%\platform-tools
%ANDROID_HOME%\tools

Considering the location of the Android SDK is at the root of disk C:\

Releases

No releases published

Packages

No packages published

Languages