Adding System Application using application source code

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Adding System Application using application source code

semw-2
Hi everyone
I am trying to add a system application through application source code (Complete working android studio project). My application is working in android studio but when I add it in packages/apps/myapplication ,write its make file and register its package name in aosp_product.mk and compile AOSP then i get some errors.
Any help will be highly appreciated.

Errors:
packages/apps/Myapplication/src/main/res/layout/content_main.xml:2: error: resource string/appbar_scrolling_view_behavior (aka com.myapplication:string/appbar_scrolling_view_behavior) not found.
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) ####

My android.mk
LOCAL_PATH:= $(call my-dir)
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-support-core-ui \
    $(ANDROID_SUPPORT_DESIGN_TARGETS) \
    android-support-transition \
    android-support-v13 \
    android-support-v4 \
    android-support-v7-appcompat \
    android-support-v7-cardview \
    android-support-v7-recyclerview \
include $(BUILD_PACKAGE)


--
--
unsubscribe: [hidden email]
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-porting/e959f598-1680-455c-aba5-7b7fc4651800n%40googlegroups.com.