Show/Hide Toolbars

Android Applications

When you add an Android Service to an Application the following information is noted by the Application and stored in its .dprog file.

 

1.separate service "jibServiceName.so" Library files for Debug and Release and for Android 32 and 64.

2.a "ServiceName.jar" file

3.a ServiceModuleName.pas file

4.a link to the ServiceName.dpr/dproj file

 

If you use the default destination compiler options " .\$(Platform)\$(Config)" for output and DCU files and the directory structure used in Delphi Samples of a service directory containing  the data module and Service project files with any application units and application project files in a separate directory the "Add Android Service" can find these  references using the wizard after the service has been built. If you choose other options you have to link them manually. Once correctly linked building or compiling the application should first build or recompile and link the service.

 

This information is then used in the application compile, packaging and deployment process. Missing or incorrect references cause errors.

 

You can check to see if the files have already been attached by selecting "Remove Android Service" and looking for entries without progressing to the "Final" stage.

 

This linking does seem a bit flaky and may be only partially maintained when files are renamed or moved between directories. While the  "ServiceName.jar" file shows up in remove on Berlin it does not get reported in Sydney which may explain why old references can be leftover.