2

When i build the android application in AOSP build tree, it generate the following error.

error: resource style/Base.Widget.AppCompat.Button (aka com.sample.application:style/Base.Widget.AppCompat.Button) not found.
error: resource style/Base.Widget.AppCompat.Button (aka com.sample.application:style/Base.Widget.AppCompat.Button) not found.
error: resource style/Theme.AppCompat.Light.NoActionBar (aka com.sample.application:style/Theme.AppCompat.Light.NoActionBar) not found.
vendor/sample/apps/SampleApplication2/res/values/styles.xml:6: error: style attribute 'attr/colorPrimary (aka com.sample.application:attr/colorPrimary)' not found.
vendor/sample/apps/SampleApplication2/res/values/styles.xml:7: error: style attribute 'attr/colorPrimaryDark (aka com.sample.application:attr/colorPrimaryDark)' not found.
vendor/sample/apps/SampleApplication2/res/values/styles.xml:8: error: style attribute 'attr/colorAccent (aka com.sample.application:attr/colorAccent)' not found.

My Android.mk is as follows

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := SampleApplication2
LOCAL_MODULE_TAGS  := optional
LOCAL_CERTIFICATE  := platform
# SRC files
 LOCAL_SRC_FILES := \
    $(call all-java-files-under, java) \
    $(call all-named-files-under, *.aidl, aidl)
# RES files
LOCAL_RESOURCE_DIR := \
    res
LOCAL_USE_AAPT2 := true
LOCAL_AAPT_FLAGS := --auto-add-overlay \
--extra-packages android.support.compat \
--extra-packages android.support.v7.appcompat \
--extra-packages android.support.v7.recyclerview

#Include Static libraries

LOCAL_STATIC_JAVA_LIBRARIES := android-support-v7-appcompat
LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4
LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-gridlayout
LOCAL_STATIC_JAVA_LIBRARIES += android-support-v13
LOCAL_STATIC_JAVA_LIBRARIES += android-support-annotations
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_APPS)

include $(BUILD_PACKAGE)

LOCAL_SRC_FILES := $(call all-subdir-java-files)

please correct my android.mk file if any mistakes is on it Any help will appreciated.

Vidhi Dave
  • 5,614
  • 2
  • 33
  • 55
Midhun PM
  • 512
  • 1
  • 7
  • 24

1 Answers1

1

You have to refer resources like below,

LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res \
frameworks/support/v7/appcompat/res \
frameworks/support/design/res
Ranjith KP
  • 858
  • 6
  • 18