2016年10月24日星期一

[Guide] How to use dynamic library on Android in Delphi?

1. Create two Multi-Device applications. One as host App, one as dynamic lib.

2.  Run the Dynamic Lib project (no need to connect your phone).
3.Open Android\Release\AndroidLib\debug folder of your dynamic lib project, there is a libAndroidLib.so. This is the library file, as DLL on windows.
4.Switch to HostApp.
5.Open Project Deployment, Add the so file above, set a proper Remote Path.
6.Then run HostApp. Use LoadLibrary load the .so file. And use GetProcAddress to get the exported function.

By:Chang

Here is the Demo:
https://drive.google.com/file/d/0BwdfodaqQm4pNlRTR3hvb1R0a0E/view?usp=sharing

2 条评论:

  1. 嗨,你好,我使用了你的方式動態載入.SO 開FORM會有錯誤。
    請問應該要調整什麼嗎

    回复删除
    回复
    1. so裏無法打開Form,這應該是emb的bug

      删除