Login with your social account

Thread Rating:
  • 128 Vote(s) - 2.66 Average
  • 1
  • 2
  • 3
  • 4
  • 5

How to build android apps from command line?
#1

Hello android developers, help me please.. I am interested in making Android apps but I don't have any idea to build android apps from command line.

Is anybody able to put some light on this subject please?
Reply
#2

There are two ways to build your application using the Ant build script: one for testing/debugging your application — debug mode — and one for building your final package for release — release mode. Regardless of which way you build your application, it must be signed before it can install on an emulator or device—with a debug key when building in debug mode and with your own private key when building in release mode.

Whether you're building in debug mode or release mode, you need to use the Ant tool to compile and build your project. This will create the .apk file that you can install on an emulator or device. When you build in debug mode, the .apk file is automatically signed by the SDK tools with a debug key, so it's instantly ready for installation onto an emulator or attached development device. You cannot distribute an application that is signed with a debug key. When you build in release mode, the .apk file is unsigned, so you must manually sign it with your own private key, using Keytool and Jarsigner.

It's important that you read and understand Signing Your Applications, particularly once you're ready to release your application and share it with end-users. That document describes the procedure for generating a private key and then using it to sign your .apk file. If you're just getting started, however, you can quickly run your applications on an emulator or your own development device by building in debug mode.

If you don't have Ant, you can obtain it from the Apache Ant home page. Install it and make sure it is in your executable PATH. Before calling Ant, you need to declare the JAVA_HOME environment variable to specify the path to where the JDK is installed.
Reply


Possibly Related Threads...
Thread / Author Replies Views Last Post

Forum Jump:


Users browsing this thread: 1 Guest(s)