Giter Site home page Giter Site logo

celersms / batchapk Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 1.0 31 KB

How to build an Android APK from the command line, without IDE

Home Page: https://www.celersms.com/batch-apk.htm

License: MIT License

Java 45.17% Batchfile 54.83%
android apk no-ide android-apk

batchapk's Introduction

A Hello World APK built from the command line, no IDE

This simple project shows how to build an Android APK using the command line tools only, without any IDE.

In order to keep it as simple as possible we'll use the JDK (Java Development Kit) and the Android SDK only.

Java 1.6 or later is required.

The Android SDK is no longer available as a standalone downloadable package for Windows. It's necessary to download the Command Line Tools package from https://developer.android.com/studio The link to download the Command Line Tools is at the bottom of that page.

After that you can use the sdkmanager tool to download the Build Tools and the platform files for the required Android API level. Currently the latest API level is 29. You can also download AVD images to emulate an Android device.

A sample keystore with a demo certificate is included. It's highly recommended to generate your own certificate if you plan to modify and redistribute the APK. The JDK keytool can be used to generate a new certificate and store it into a new keystore:

del src\demo.keystore /q
"%JAVA_HOME%"\bin\keytool -genkey -keystore src\demo.keystore -keyalg RSA -keysize 2048 -validity 10000 -alias demo

Fill in all the details about yourself and your organization and select an appropriate password. The password used in our sample keystore is password

Edit build.bat using any text editor like Notepad and modify the following configuration parameters:

  • BUILD_TOOLS is the location of the Build Tools in the Android SDK.
  • ANDROID_JAR is the path to the android.jar for the required Android API level.

After that launch build.bat to create the APK.

batchapk's People

Contributors

vkamenar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ana-el

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.