Open the Deployment Tool

To deploy an FMX application you need to configure the deployment settings for your project.

You can launch the deployment tool from the project menu:

Deployment menu option

Configure the Deployment

First select a configuration setting, for example Debug configuration - Android 64-bit platform.

Next, click the Add Files toolbar button to select the assets you would like to deploy.

Once the dialog closes, ensure the files you want to deploy are checked.

You can now configurate their remote paths. For Android, you will typically set the paths to .\assets\internal\ which allows you to access the file at runtime in the application's Documents folder:

class function TFiles.GetPath(const aFilename: string); string;
begin
    Result := TPath.Combine(TPath.GetDocumentsPath, aFilename);
end;

In this example a project is being configured for an Android deployment:

Deployment screenshot 2

Changes Not Deployed

Occasionally, if you add a new file, or update an existing file, the changes may not be deployed. This is often due to caching. The solution is to Clean the project:

Deployment screenshot 3

Build the project, click the green Reconcile button, then the Deploy button:

Deployment screenshot 4

Next, make sure you have the correct configuration selected in the project explorer:

Deployment screenshot 5

On the main toolbar, select your phone, then click run:

Deployment screenshot 6

Changes Still Not Deployed

If your changes still do not appear on the phone:

  • uninstall the application from your phone
  • click run from the IDE toolbar

Missing AndroidManifest

If you get a deployment or build error indicating that the AndroidManifest.Xml file can't be found, check that you haven't accidentally set its remote path incorrectly. It should be .\ as per this example:

Deployment screenshot 7

Upgrade Issues

When upgrading a project to a new version of Delphi, or a new Android SDK, you may get build errors caused by the existing AndroidManifest.Xml.

If so, backup the AndroidManifest.Xml, delete it from the project, and rebuild. The IDE will recreate it.