How to create an .apk file without using Eclipse

I want to create "Theme Creator" for Android, so I want to create a .apk file after creating the theme. Can someone guide me how to act? Any help in this regard would be greatly appreciated.

+2
source share
2 answers

The best way I've found to create .apk without eclipse or without any other IDE is to use maven with this neat plugin: Maven-Android-Plugin . It is actively maintained and well documented. You can start with sample .

The disadvantage of this approach is that you need to change the build process, and not every dirty little part is hidden in the IDE.

The upper levels are complete control over the string, signatures, code checks, CI integration and free choice of the IDE.

+3
source

In a project prepared by the SDK tools , you can create .apk with ant debug to get started.

You can also learn how to use the SDK tools directly and automate what you learn using Makefiles or scripts. Terminal IDE, a market application that provides a development environment on the device, does this without ant, or does, or more involved build systems, so there are scripts in its sample projects that directly call javac, dx, aapt. For example, one of my build scripts on this system:

 set -x P=net/rapacity/wizardry rm src/$P/R.java mkdir -m 770 -p dist || exit mkdir -m 770 -p build/classes || exit aapt p -f -M AndroidManifest.xml -F build/resources.res \ -I ~/system/classes/android.jar -S res/ -J src/$P || exit cd src for F in \ sokoban2/{Maze,TileView,MazeActivity}.java \ R.java Maze.java EmptyActivity.java {emptyquiet,gadgets,sokoban}/Maze{,Activity}.java \ ; do echo $F > ~/tmp/.remake javac -d ../build/classes $P/$F 2> ~/tmp/javac.out ../redcat ~/tmp/javac.out grep error ~/tmp/javac.out && exit done cd .. ( cd build/classes; dx --dex --verbose --no-strict --output=../core.dex net ) || exit apkbuilder dist/core.apk -u -z build/resources.res -f build/core.dex || exit signer dist/core.apk core-debug.apk 

All that fusses with redcat, javac.out, etc., is to abort the assembly with an error (javac unhelpfully returns 0 regardless of success), and also allows you to quickly try again to compile the last attempt to check if the errors are fixed. ant, maven, even the wise use of make, will provide you with this stuff.

+2
source

All Articles