我正在尝试在构建时通过AOSP编译应用程序。它使用类android.os.AsyncResult
。每当我尝试制作项目时,它都会以错误停止
packages/apps/MyPackage/src/MyCompany/MyClass.java:[lineNumber]: error: cannot find symbol import android.os.AsyncResult;
到目前为止我做了什么:
我的Android.mk如下:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_JAVA_LIBRARIES := telephony-common
appcompat_dir := ../../../prebuilts/sdk/current/support/v7/appcompat/res
gridlayout_dir := ../../../prebuilts/sdk/current/support/v7/gridlayout/res
res_dir := res $(appcompat_dir) $(gridlayout_dir)
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dir))
LOCAL_AAPT_FLAGS := --auto-add-overlay
LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.appcompat:android.support.v7.gridlayout
LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4
LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-appcompat
LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-gridlayout
LOCAL_PACKAGE_NAME := MyPackage
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)
我怀疑包/应用中的应用无法自动从frameworks/base/core/java/...
找到来源。但这也没有意义,因为使用frameworks/base/core/java/...
我有点迷失在这里。有人能指出我如何解决这个符号的缺失吗?