Looking for tips, tricks, and experiences of comrades who’ve developed Android apps using Vim, Neovim, or other text editors rather than Android Studio.

It’s been a while since I did any Android development but I want to develop an app for personal use. Between then and now I’ve been using Neovim for everything so I’m loathe to go back to Android Studio but it handles a lot of boiler plate for new projects.

Has anyone got any thoughts or tools to share? I’m very comfortable in the CLI so my dream setup would be using Neovim as a code editor and running build commands etc in a terminal nearby.

  • 小莱卡@lemmygrad.ml
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 months ago

    I don’t do android development but i do some basic rust stuff, i will share some of the plugins i use when im back home.

    Something that comes to mind is using COQ snippets for boilerplate code, or maybe autocommands?

  • Muad'Dibber@lemmygrad.ml
    link
    fedilink
    arrow-up
    5
    ·
    2 months ago

    I’ve tried and failed at it, many times. You pretty much have no choice but to use android studio. There is a vim plugin for it at least.

    • Red Magpie@lemmygrad.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      2 months ago

      Ah that sucks to hear :-( I didn’t know there was even a plugin ecosystem to Android Studio but of course there is.

      I might just use Android studio to set up the project and then do my actual keyboard-bashing in Neovim later. All I really want is the boilerplate set up properly and my app will be a single activity with maybe 3 views, so once that’s all generated I’ll try switching.

      Out of interest, what has been the failure points for you trying this in the past?

      • Muad'Dibber@lemmygrad.ml
        link
        fedilink
        arrow-up
        2
        ·
        1 month ago

        Oops, sry missed this one. jdtls , the java language server that works with vim / neovim / helix, and the kotlin-language-server don’t work with android libraries.

        • Red Magpie@lemmygrad.mlOP
          link
          fedilink
          arrow-up
          2
          ·
          29 days ago

          No worries re long replies. That’s really interesting. I’ve never used any LSP features before (I am definitely out of touch though) so perhaps this wouldn’t be such a blocker.

  • nephs@lemmygrad.ml
    link
    fedilink
    arrow-up
    3
    ·
    2 months ago

    Have you worked with entr?

    It generalises watch modes. I can see a setup with tmux and entr to kick-start builds in watch mode, and whatever your neovim stuff is.

    • Red Magpie@lemmygrad.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      2 months ago

      Thanks comrade, I’ve never worked with entr but it looks really cool! Thanks for the share.

      I doubt I’d need the constant builds on this project but it’s going into my list of tools to keep in the back pocket.

  • lorty@lemmygrad.ml
    link
    fedilink
    arrow-up
    2
    ·
    2 months ago

    I’m not sure what your project’s requirements are, but it would probably be easier to make an app with React-native or flutter or some other multiplatform since you can spin an app very fast and iterate over it without actually needing any android studio tools (other than the emulator, if you want it) after the initial setup.

    • Red Magpie@lemmygrad.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      2 months ago

      Thanks for reply comrade. I’m not really a Javascript person, but it’s good to know there are alternatives to use for building apps quickly. The last time I used Javascript for anything was jQuery on a website in 2017 and even I think it was outdated in favour of all the fancy frameworks. I haven’t the head for keeping up with it al.

      I also got burned by multiplatform frameworks back during my undergrad during a group project when the self-elected team lead — a proper bourgie moneyed type who went to like Stow or something — forced us to use Titanium to build an android app when the rest of us wanted to write it in native Android Java. It was godawful, and then when I later came to developing apps I had a pleasant enough time writing in Java.

  • GreatSquare@lemmygrad.ml
    link
    fedilink
    arrow-up
    1
    ·
    2 months ago

    For personal use, Github can automatically build and test your project using Github Actions. You get 2000 minutes / month free.

    • Red Magpie@lemmygrad.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      2 months ago

      Cheers for the reply comrade.

      Since this is just a personal project I’ll be installing the app just on my phone via USB and adb, and don’t need a proper CI/CD build system. I just need to compile on my machine and stick the apk file onto my phone.