title: Add System application(Through App source code/working AS project) in AOSP source code
body: <p>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 <code>Android.mk</code>, placed it in <code>packages/app/myapplication/Android.mk</code>. Registered application package name in <code>aosp_source_code/build/target/product/handheld_system.mk</code>
  Did I make any mistakes in <code>Android.mk</code> file? or am I missing any steps.</p>
  <p>Here is code of my <code>Android.mk</code></p>
  <pre><code>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) 
  </code></pre>
  <p><strong>Errors</strong></p>
  <pre><code>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)
  </code></pre>