Compiling Android applicaton as part of AOSP source code

 $ cd Android_AOSP 
 $ mkdir packages/apps/HelloWorld 

Copy your java application source code to packages/apps/ e.g. HelloWorld

 $ cd packages/apps/HelloWorld 

Write an as below,



LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4


LOCAL_SRC_FILES := $(call all-java-files-under, src)



include $(BUILD_PACKAGE)


 Resolving Errors

1) Error: This attribute must be localized.
If you get error like below,

packages/apps/HelloWorld/res/layout/activity_main.xml:12: error: Error: This attribute must be localized. (at ‘text’ with value ‘Advertise’).

Solution :

Change packages/apps/HelloWorld/res/layout/activity_main.xml as below,


and add this reference to res/values/string.xml:

<string name=”advertise”>Advertise</string>

Reference : Click the Link

Installing Android Application

$ ./out/host/linux-x86/bin/adb install application_name.apk

After Installing, or during installation you might get an error like, “Error : Parsing the package”, to resolve this you need to verify the ” minSdkVersion ” whether its compatible to API on your mobile or not, and correct the same or alternatively, change AndroidManifest.xml Like below to set to min. value.

– android:minSdkVersion=”11″
+ android:minSdkVersion=”1″^M

Reference : Click the Link

Android Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Commands and Packages Compilation Content Management System - CMS Core Kernel C Programs Development & Build Development Environment Setup Errors & Failures Flutter git Go Language Programs Hardware Platforms HTML JAVA Programs Kernel & Device Drivers Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Monetization / Google AdSense NDK / Middleware / HAL OS Concepts PHP Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized User Interface Userspace Utilities Web design and development Wordpress Yocto / Bitbake / Openembedded

Leave a Reply / Ask Question