> 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
