astudio.nvim is a Neovim plugin that streamlines Android development by integrating Gradle, Android Virtual Devices (AVD), and Android Debug Bridge (ADB) directly into your editor.
- Gradle Integration: Run Gradle tasks and view output in Neovim.
- AVD Management: List and start Android Virtual Devices from commands or Lua.
- ADB Utilities: Run ADB commands and interact with devices via commands or Lua.
- Command Palette: Access features via custom Neovim commands.
- Lua API: Programmatically control AVD and ADB from your config or plugins.
NOTE: This plugin does not add support for Kotlin. Please refer to the official Kotlin Language Server.
- Neovim 0.7
ANDROID_USER_HOMEandANSROID_HOMEenvironment variables set. Please refer to the official documentation.- The
android-commandlinetoolsinstalled (brew install android-commandlinetools) - Emulator and platform-tools installed (
sdkmanager emutlator platform-tools)
Using lazy.nvim
return {
'Marfien/astudio.nvim',
cmd = "Android",
opts = {},
init = function()
vim.env.ANDROID_USER_HOME = vim.env.XDG_CONFIG_HOME .. "/android/"
vim.env.ANDROID_HOME = "..."
end
}-
:Android avd <create|launch|delete>
Manages Android Virtual Devices -
:Android install
Installs the Activity onto an AVD -
:Android uninstall
Removes the Activity from an AVD
NOTE: Not implemented, yet -
:Android logcat
Attaches to the Activities logs -
:Android focus
Focuses the output window again
There is a shallow wrapper around the AVD and ADB CLI tools:
local avd = require('astudio-nvim.avd')
local adb = require('astudio-nvim.adb')All functions within are annotated with type hints. The names should speak for them self.
Issues and pull requests are welcome!
MIT License. See LICENSE for details.