I am trying to add an application in AOSP source through app source code, not by apk . My application is simple hello world application which I have developed in Android Studio. I have wrote its Android.mk, placed it in packages/app/myapplication/Android.mk. Registered application package name in aosp_source_code/build/target/product/handheld_system.mk
Did I make any mistakes in Android.mk file? or am I missing any steps.
Here is code of my Android.mk
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := Myapplication
LOCAL_MODULE_TAGS := optional
LOCAL_PRIVILEGED_MODULE := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_SRC_FILES := $(call all-java-files-under, src/main/java)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/src/main/res
LOCAL_MANIFEST_FILE := src/main/AndroidManifest.xml
LOCAL_DEX_PREOPT := false
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_USE_AAPT2 := true
LOCAL_STATIC_ANDROID_LIBRARIES := \
android-arch-lifecycle-extensions \
android-support-v7-recyclerview \
android-support-v7-appcompat \
android-support-constraint-layout
include $(BUILD_PACKAGE)
Errors
packages/apps/Myapplication/src/main/res/layout/content_main.xml:8: error: attribute defaultNavHost (aka com.myapplication:defaultNavHost) not found.
packages/apps/Myapplication/src/main/res/layout/content_main.xml:8: error: attribute navGraph (aka com.myapplication:navGraph) not found.
packages/apps/Myapplication/src/main/res/navigation/nav_graph.xml:2: error: attribute startDestination (aka com.myapplication:startDestination) not found.
packages/apps/Myapplication/src/main/res/navigation/nav_graph.xml:14: error: attribute destination (aka com.myapplication:destination) not found.
packages/apps/Myapplication/src/main/res/navigation/nav_graph.xml:24: error: attribute destination (aka com.myapplication:destination) not found.
error: failed linking file resources.
11:57:34 ninja failed with: exit status 1
#### failed to build some targets (4 seconds)