roger
roger

Reputation: 9913

How to compile AIDL files with android make file?

I need to compile a android project with make file, but it seems that cannot find aidl files.

here is my 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))

this returns that package com.skyworth.skyappstore.aidl does not exist, com.skyworth.skyappstore.aidlis the place where I place my aidl file.

So how to change the make file to compile this project right

Upvotes: 1

Views: 1381

Answers (1)

南山怀槿
南山怀槿

Reputation: 71

Are AppStoreCallBackAIDL and AppStoreServiceAIDL aild files? Maybe you can change

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

to this:

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

Upvotes: 1

Related Questions