Step by step instructions to Build Android Application

riyoko asked Dec 23,2021
1

On the off chance that you would prefer not to introduce various projects for building your Android project, this article is for you. You will require just JDK, the Android SDK stage apparatuses, and the least Android stage to construct apk from the order line.

 

1. Presentation

In this article, I will portray how to construct Android applications from order lines, for example, the most effective method to construct the .rar file utilizing Android apparatuses and order lines. Accordingly, you can utilize the cluster record for building your Android application. I use Windows orders in this article. Be that as it may, you can utilize similar Android orders and devices and a similar program in case you are dealing with Linux OS. The case of the content for Linux OS is remembered for the example project, appended to this article.

 

2. Readiness

Before we fabricate Android .apk from the order line, you should introduce Java JDK and Android SDK on the framework where you will construct your application. The private Keystore additionally should be available.


2.1 Java JDK

You can utilize Java JDK from Eclipse or download it from this connection: http://www.oracle.com/technetwork/java/javase/downloads/index.html and afterward introduce it.


2.2 Android SDK

Android SDK and its HOW TO zip file extension are accessible here: http://developer.android.com/sdk/index.html.

The Android SDK Platform-apparatuses, SDK Platform Android 2.2, and API 8 are the base that is required for the test project work.


2.3 Environment Variables

Assuming you need to have a meaningful group script__ and a program without extremely long document way definitions, you should utilize the climate factors. I prescribe you to characterize the accompanying ones:

·        JAVABIN way to the Java JDK container envelope. For instance: C:\Program Files\Java\jdk\bin. This organizer should contain the javac.exe and jarsigner.exe records.

·        ANDROID-SDK way to the Android SDK envelope. For instance: C:\Program Files\Andoroid\android-SDK-windows.

2.4 Private Key for Signing

You can peruse everything about marking, making private keys, and different tasks here: http://developer.android.com/guide/distributing/application signing.html

 

%JAVABIN%\keytool - genkey - v - keystore my-discharge key.keystore - false name alias_name - keyalg RSA - keysize 2048 - legitimacy 10000

 

Determine your information and you will get my discharge key. keystore document. You should recall the secret word. You will require it later. Additionally, I prescribe you to put the keystone document in a similar organizer as the task. In the example, It is in the Keystore organizer in the venture index.


2.5 Example Files Structure

You should recall that the dx Android device requires the full way, which MUST not contain any spaces. Thus, take a look at the reality, that your task way fulfills the necessity.

 

3. Order Sequence

We should perceive how to make an apk document. The accompanying orders are for the Windows OS, yet you can make torrent file from the order line for the Linux OS by utilizing the content in the appended test.

 

Above all else, we should save the current way. Then, at that point, we should change the CD variable to the way to the build.bat document:

 

SET PREV_PATH=%CD%

 

compact disc/d %0\..

 

Then, at that point, container and gen old organizers ought to be reproduced:

 

I add a few definitions. They make the cluster document lucid and simple to refresh and in this manner work on Android apk advancement. In this way, I suggest you the accompanying definitions:

·        minimum Android s;

·        The way to dx Android instrument;

·        The way to the javac utility of JDK.

 

Likewise, I wanted the characterized factors for my task:

·        APP_NAME is the name of utilization that will be utilized for the yield APK document.

·        JAVAC_BUILD and JAVAC are similar orders, however, there is a way to the sources, create R class, and yield organizer in JAVAC_BUILD.

 

These factors let us change the task name and ways to the sources simpler.

 

 

·        Furthermore, presently, all arrangements are done and the application can be fabricated. The R record will be produced utilizing adapt apparatus. All assets will be pressed into the resources.ap_ record:

·        Android shows to record, res, and resources envelope are the information. Adapt will produce the R class and put it into the gen envelope. Then, at that point, AAP will pack the asset records into the resources.ap_ document.

·        Each envelope that contains *.java record should be called with javac. In my model, there is just a single organizer with javac. Thus, I have just one order line for building sources:


 

·        As you recollect, the JAVAC_BUILD order has as of now contained the contentions that determine the container organizer. The container envelope is a yield organizer for the incorporated sources.

·        As of now, the sources have been assembled effectively and they can be stuffed in the uncommon dex document:


·        For the application marking, the assets document should be duplicated to another record, which will be utilized for the marking:


·        The classes.dex record should be added to the new document that has an ap_ expansion


 

Presently, the ap_ record is a right apk document. In any case, it isn't marked at this point and it can't be introduced to the Android gadget.

The making of the marked Android application from the *.ap_ document is the accompanying (Output record name should vary from the info record name – for this situation the document expansion is changed to the *.apk)


  • Your Answer(1)
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP
0 / 10000
    Browse other questions tagged or ask your own question.