问题
Is it possible to develop Android apps using only the Android SDK, without any IDE like Android Studio?
回答1:
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:
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.
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.2The
--gradle-versionactually refers to the Gradle Android plugin version, not the version of Gradle itself. Finding this out wasn't easy.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 tominifyEnabledbefore the project will build. And using the Gradle plugin 1.2.2, the fileproject/gradle/wrapper/gradle-wrapper.propertieshas the Gradle distribution incorrectly listed asgradle-1.2.2-all.zip. This should begradle-2.2.1-all.zip.These are files generated by the SDK with errors.
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).
回答2:
For android the basic debugging environments are: ADB DDMS Java Debugger
You can try with them. More details are here : http://developer.android.com/tools/debugging/debugging-projects-cmdline.html
回答3:
yes. You Can . Simply you can user Command Line . Command Android Development I will rather use IDE just to get things done faster.
回答4:
Sure, use command-line tools But... Why you dont want to use a IDE? You have a lot optiones.
回答5:
Writing an Android app on Notepad is what I do on my Windows Laptop.
First you configure your laptop as follows:
Download development Kits: Download a Java Development Kit 1.6 for Windows and an Android Development Kit . Similarly try downloading older version of Android kit GUI version of Kit Manager so that you can download essentials. Using kit Manager download Android-23 platform build tools. Android Studio may have slower performance, so try to avoid it.
Configure Kits: Set Windows
PATHvariable by right clickingMy Computer -> Properties -> Advanced System Settingsor change the appropriate settings in your Control Panel.PATHshould include the Java's compiler executable file in Java directory, and theandroid.batfile of Android Kit.Download Build-Tool: (recommended, but Ant can be used too.) These programs configure the command-line tools for easy usage for our convenience. I downloaded version 2.2.1 as it can use old Java & old Android.
I've also written about these instructions on my GitHub Page: https://animeshshrivastav.github.io/
来源:https://stackoverflow.com/questions/29290588/can-i-develop-android-apps-without-an-ide