源码编译:Android.mk关联AAR和Jar文件


LOCAL_STATIC_JAVA_LIBRARIES := android-support-v7-appcompat \
eventbus\
custom-core\
demo-gson\
rxjava \
ofilm-commonipc\
okhttp3\
logging\
okio\
retrofit\
adapter\
converter\
rxclasses\
reactive\
converter-gson

LOCAL_STATIC_JAVA_AAR_LIBRARIES := widgetLibs \
h5sdk \
httpsdk


LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := custom-core:app/libs/core-3.3.0.jar \
                                        demo-gson:app/libs/gson-2.7.jar \
                                        rxjava:app/libs/rxjava-2.2.9.jar \
                                        okhttp3:app/libs/okhttp-3.11.0.jar\
                                        logging:app/libs/logging-interceptor-3.11.0.jar\
                                        okio:app/libs/okio-1.14.0.jar\
                                        retrofit:app/libs/retrofit-2.4.0.jar\
                                        adapter:app/libs/adapter-rxjava2-2.4.0.jar\
                                        converter:app/libs/converter-gson-2.4.0.jar\
                                        rxclasses:app/libs/classes.jar\
                                        reactive:app/libs/reactive-streams-1.0.2.jar\
                                        converter-gson:app/libs/converter-gson-2.4.0.jar \
                                        widgetLibs:app/libs/WidgetLibs-release.aar \
                                        h5sdk:app/libs/h5sdk.aar \
                                        httpsdk:app/libs/httpsdk.aar

include $(BUILD_MULTI_PREBUILT)
include $(call all-makefiles-under, $(LOCAL_PATH))

在android.mk文件中,LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES 变量下加入真实的jar包和aar的全路径,然后对每个jar和aar包关联一个源码编译的包名,LOCAL_STATIC_JAVA_LIBRARIES变量下加入jar包,LOCAL_STATIC_JAVA_AAR_LIBRARIES变量下加入aar包,这样就关联了jar包和aar包!

 

 

 

 

 

你可能感兴趣的:(系统层)