Android源码中MyAPIs放在packages/apps下。MyAPIs下创建目录libs以及libs/armeabi,并把MyJar.jar放在libs/,把libMyLib.so放在libs/armeabi。
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES:=libMyJar:libs/MyJar.jar
LOCAL_PREBUILT_LIBS:=libMyLib:libs/armeabi/libMyLib.so
include $(BUILD_MULTI_PREBUILT)
1、集成jar包
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES指定prebuiltjar库的规则,格式:别名:jar文件路径,编译用BUILD_MULTI_PREBUILT
注:别名要跟jar包名字一致
如上,jar包名为MyJar,则别名为libMyJar
2、集成.so包
LOCAL_PREBUILT_LIBS指定prebuilt so的规则,格式:别名:so文件路径
别名的命名同上,编译用BUILD_MULTI_PREBUILT
3、MyAPIs.apk编译生成在out/target/product//system/app/下;
libMyLib.so放在out/target/product//syste