         apkbuilder (make-apk-builder apk-name out-res-pkg-path out-dex-path)]
     (doseq [rj resource-jars]
       (.addResourcesFromJar apkbuilder rj))
+    (when-not (empty? native-libraries-paths)
+      (debug "Adding native libraries:" native-libraries-paths))
+    (doseq [lib native-libraries-paths]
+      (.addNativeLibraries apkbuilder ^File (io/file lib)))
     (.sealApk apkbuilder)))


(defn create-apk
  "Delegates APK creation to ApkBuilder class in sdklib.jar."
  [{{:keys [sdk-path out-res-pkg-path out-dex-path]}
    :android} & {:keys [apk-name resource-jars]}]
  ;; Dynamically load sdklib.jar
  (pomegranate/add-classpath (io/file sdk-path "tools" "lib" "sdklib.jar"))

(ns leiningen.droid.sdk
  "Convenient function to interact with utilities in Android SDK."
  (:use [leiningen.core.main :only [debug]])
  (:require [cemerick.pomegranate :as pomegranate]
            [clojure.java.io :as io])
  (:import java.io.File java.io.PrintStream))
