如何用android make文件编译AIDL文件?

时间:2015-01-22 01:33:31

标签: android makefile aidl

我需要用make文件编译一个android项目,但似乎无法找到aidl文件。

这是我的Android.mk

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional


LOCAL_OVERRIDE_SRC_FILES := $(call all-java-files-under, devices/$(TARGET_DEVICE))

LOCAL_SRC_FILES := $(call all-java-files-under, SDK src) \
                        src/com/skyworth/skyappstore/aidl/AppStoreCallBackAIDL \
                        src/com/skyworth/skyappstore/aidl/AppStoreServiceAIDL \

LOCAL_SRC_FILES := $(foreach f,$(LOCAL_SRC_FILES), \
                $(if $(findstring $(f),$(LOCAL_OVERRIDE_SRC_FILES)),,$(f)))
# This is the target being built.
LOCAL_PACKAGE_NAME := APPStore

LOCAL_CERTIFICATE := shared

LOCAL_STATIC_JAVA_LIBRARIES := android fastjson jackson ksoap2 layoutlib tdcode

LOCAL_PROGUARD_ENABLED := disabled

include $(BUILD_PACKAGE)

include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := android:android.jar \
                                        fastjson:fastjson-1.1.32.jar \
                                        jackson:jackson-all-1.9.8.jar \
                                        ksoap2:ksoap2-android-assembly-3.0.0-jar-with-dependencies.jar \
                                        layoutlib:layoutlib.jar \
                                        tdcode:tdcode.jar
include $(BUILD_MULTI_PREBUILT)
include $(call all-makefiles-under,$(LOCAL_PATH))

这会返回package com.skyworth.skyappstore.aidl does not existcom.skyworth.skyappstore.aidl是我放置aidl文件的位置。

那么如何更改make文件以正确编译该项目

1 个答案:

答案 0 :(得分:1)

AppStoreCallBackAIDL和AppStoreServiceAIDL是否有文件?也许你可以改变

  

LOCAL_SRC_FILES:= $(调用all-java-files-under,SDK src)\                           src / com / skyworth / skyappstore / aidl / AppStoreCallBackAIDL \                           src / com / skyworth / skyappstore / aidl / AppStoreServiceAIDL \

到此:

  

LOCAL_SRC_FILES:= $(调用all-java-files-under,SDK src)\                           src / com / skyworth / skyappstore / aidl / AppStoreCallBackAIDL.aidl \                           src / com / skyworth / skyappstore / aidl / AppStoreServiceAIDL.aidl \