Step by Step Instructions to Build Android Application
Step by Step Instructions to Build Android Application

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.

Instructions to Build Android Application

Here are some steps to build android application:

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 .apk 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 HOWTO record are accessible here:

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 apk 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 update;

The way to adapt the Android device and its contentions for adding documents into the current chronicle;

The way to adapt the Android device and its contentions for pressing and creating assets;

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.

SET APP_NAME=SecureSms

SET JAVAC_BUILD=%JAVAC% – sourcepath “src;gen” – d “receptacle”

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:

call %JAVAC_BUILD% src\org\secure\sms\*.java

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:

call %ANDROID_DX% – output=”%CD%\bin\classes.dex” %CD%\bin

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

duplicate “%CD%\bin\resources.ap_” “%CD%\bin\%APP_NAME%.ap_”

The classes .bak file should be added to the new document that has an ap_ expansion

call %ANDROID_AAPT_ADD% “%CD%\bin\%APP_NAME%.ap_” “%CD%\bin\classes.dex”

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):

call “%JAVABIN%\jarsigner” – keystore “%CD%\keystore\my-discharge key.keystore” – storepass “secret word” – keypass “secret phrase” – signedjar”%CD%\bin\%APP_NAME%.apk” “%CD%\bin\%APP_NAME%.ap_” “alias_name”

To test the model and produce apk from order line yourself, you should:

  • unpack it
  • do the means 2.1-2.5 from the Preparations passage
  • run the build.bat file was initially distributed on https://www.apriorit.com/

Conclusion

I hope this article will help you to build an android application. Now you can follow the above-mentioned steps.

LEAVE A REPLY

Please enter your comment!
Please enter your name here