Adding a external jar reference in Android.mk

前端 未结 5 1963
北恋
北恋 2021-02-01 10:56

I want to add a external third party jar file in the inbuilt android app.

I\'ve added the LOCAL_CLASSPATH variable in Android.mk due to which the compilation goes fine.

5条回答
  •  伪装坚强ぢ
    2021-02-01 11:44

    Here is what I used to solve the problem :

    LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := path_to_jar_file.jar
    include $(BUILD_MULTI_PREBUILT)
    

    This should be added in Android.mk after include $(BUILD_PACKAGE)

    You also need to specify the library name in LOCAL_STATIC_JAVA_LIBRARIES for compilation.

提交回复
热议问题