> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/xamarin/get-started/faq/faq-split-apk.md).

# Building ABI-Specific APKs

World's #1 PDF SDK Library for Web, Mobile, Server, Desktop

For basic information on building multiple APKs for an application, consult [Xamarin's documentation on Building ABI-Specific APKs](https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/building-apps/abi-specific-apks/). This article will discuss how to build an APK that will target a single ABI for sample project [`ContentPage.Droid`](https://github.com/ApryseSDK/xamarin-forms-sample/).

First, install Ruby. You can test by typing `gem` or `rake` from your command prompt.

The [rakefile](https://github.com/ApryseSDK/xamarin-forms-sample/blob/master/ContentPage/Droid/Rakefile.rb) is adapted from the original [rakefile](https://github.com/xamarin/monodroid-samples/blob/master/OneABIPerAPK/Rakefile.rb) from Xamarin's documentation and made to work with `ContentPage.Droid` project. It performs each of the steps that were described in the official Xamarin's documentation:

1. [Create an android:versionCode](https://github.com/ApryseSDK/xamarin-forms-sample/blob/master/ContentPage/Droid/Rakefile.rb#L35) for the APK.
2. [Write the android:versionCode](https://github.com/ApryseSDK/xamarin-forms-sample/blob/master/ContentPage/Droid/Rakefile.rb#L60) to a custom AndroidManifest.XML for that APK.
3. [Compile a release build](https://github.com/ApryseSDK/xamarin-forms-sample/blob/master/ContentPage/Droid/Rakefile.rb#L78) of the Xamarin.Android project that will singularly target the ABI and using the AndroidManifest.XML that was created in the previous step.
4. [Sign the APK](https://github.com/ApryseSDK/xamarin-forms-sample/blob/master/ContentPage/Droid/Rakefile.rb#L81) with a production keystore.
5. [Zipalign](https://github.com/ApryseSDK/xamarin-forms-sample/blob/master/ContentPage/Droid/Rakefile.rb#L82) the APK.

{% hint style="info" %}
**The script assumes there is a debug\_keystore keystore file. Change to your own keystore file with corresponding password to try it out.**
{% endhint %}

To build the split APKs for the sample app:

* Open `Developer Command Prompt for VS 2017`
* Run the `build` Rake task:

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
rake build
==> Building an APK for ABI x86 with ./Properties/AndroidManifest.xml.x86, android:versionCode = 60814120.
==> Building an APK for ABI armeabi-v7a with ./Properties/AndroidManifest.xml.armeabi-v7a, android:versionCode = 20814120.
```

{% endcode %}
{% endtab %}
{% endtabs %}

* You will find the output in:

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
ContentPage/Droid/
    |__bin.x86/com.pdftron.customrenderer_signed.apk
    |__bin.armeabi-v7a/com.pdftron.customrenderer_signed.apk
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.apryse.com/xamarin/get-started/faq/faq-split-apk.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
