我正在研究AOSP。我想将google-ads集成到我的应用中。当我构建项目时,它显示以下错误: 错误:无法解析导入com.google.android.gms.ads import是存在于java文件中的。
这是我的android.mk文件。
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
appcompat_dir := ../../../$(SUPPORT_LIBRARY_ROOT)/v7/appcompat/res
pref_dir := ../../../$(SUPPORT_LIBRARY_ROOT)/v7/preference/res
res_dir := res $(appcompat_dir) $(pref_dir)
LOCAL_MODULE_TAGS := optional
LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 android-support-v7-appcompat android-support-annotations \
android-support-v7-preference \
googleplayservices
LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dir))
LOCAL_SDK_VERSION := current
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := Test
LOCAL_AAPT_FLAGS := --auto-add-overlay
LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.appcompat:android.support.v7.preference
LOCAL_PROGUARD_ENABLED := disabled
include $(BUILD_PACKAGE)
#################################################################
include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := googleplayservices:libs/google-play-services.jar
include $(BUILD_MULTI_PREBUILT)
# Use the following include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))
任何人都可以建议我做什么?