Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I develop Android apps without an IDE?

Tags:

java

android

sdk

Is it possible to develop Android apps using only the Android SDK, without any IDE like Android Studio?

like image 683
Avra Neel Avatar asked Mar 26 '15 23:03

Avra Neel


People also ask

Can I develop android apps without Android Studio?

So technically, you don't need an IDE at all. Basically, every project has at least a build. gradle file that contains the instructions to build it. You only have to launch Gradle with the appropriate command to compile your app.

Is it possible to build apps without SDK?

It is not possible to build an Android app without using SDK.

Do we need Android Studio for app development?

You should try using Android Studio for your development needs, but you can also deploy your app to a virtual or physical device from the command line. For more information, see Build your app from the command line.


1 Answers

Yes, see the Google SDK documentation.

However, with the current toolchain and documentation it'll be an uphill struggle. I'm trying to do this too (for a dev who lives in Vim and Unix tools, Android Studio is needlessly slow and bloated).

The main issues I've found so far:

  1. The SDK documentation gives instructions to create an Ant-driven project, but the SDK is now geared towards using Gradle. If you're working through the Google documentation in a linear fashion, you'll find subsequent lessons have you issue Gradle build instructions. For your Ant-built project.

  2. There is very little documentation on how to actually create a Gradle-built project from the command line. The command line I use is:

    android create project --target android-22 --name MyProjectName --path my_project/ --activity MyProject --package com.example.android.myproject --gradle --gradle-version 1.2.2

    The --gradle-version actually refers to the Gradle Android plugin version, not the version of Gradle itself. Finding this out wasn't easy.

  3. Even if you get it to create a project properly, it probably won't build without further manipulation. One of the generated files (project/build.gradle) has an invalid directive name (runProguard - I'm guessing it's now deprecated). That must be changed to minifyEnabled before the project will build. And using the Gradle plugin 1.2.2, the file project/gradle/wrapper/gradle-wrapper.properties has the Gradle distribution incorrectly listed as gradle-1.2.2-all.zip. This should be gradle-2.2.1-all.zip.

    These are files generated by the SDK with errors.

  4. The documentation is focussed on IDE-based development. Once you get past the initial few pages on creating and managing a project using the command line, it's very IDE-focussed.

    Instructions on things like changing an app Theme are difficult or impossible to follow as they omit steps that the IDE performs for you.

In general, fully IDE-less development for Android (at least in Java, using the official SDK) is very painful. And my personal opinion is that IDE-based development is equally painful (slow, bloated, ugly on high-DPI screens under Linux and evidently full of magic that's a pain to replicate on the command line).

Edit: I should add that the above refers to using SDK tools v24.2, SDK Platform-tools v22, SDK Build-tools v22.01 and Android API 22 (5.1.1).

like image 192
Dave B Avatar answered Oct 09 '22 01:10

Dave B