# Android UIKit Installation Guide

To allow for more customization, we have now open sourced our UI Kits and deprecated the packaged UI Kit version that was previously available.

With open source, developers have more flexibility and greater customization options, allowing you to have complete control over the visual style. Open sourcing allows for more transparency and visibility, and enables contributions from a greater developer community in terms of good design, implementation, code improvement, and fixes, translating into a better product and development experience.

To ensure that you continue to receive the latest features and updates, we encourage you to migrate over to the open source version. This guide will help you:

* [Migrate Android Open Source UI Kit with an existing project](#migrate-android-open-source-ui-kit-with-existing-project)
* [Modify Open Source UI Kit to customize the visual style](#modifying-android-open-source-ui-kit)
* [Get latest Open Source UI Kit updates](#get-latest-open-source-ui-kit-updates)

## Migrate Android Open Source UI Kit with Existing Project

### Remove existing gradle dependency

If you've never used UI Kit from a gradle dependency before, you may skip this step and proceed to the next step. If you are migrating the UIKit with an existing gradle dependency, you will need to remove it from the gradle at the application level.

```
implementation 'com.github.AmityCo.Amity-Social-Cloud-UIKit-Android:amity-uikit:x.y.z'
```

### Import UI Kit module to your existing project

* Clone or download source code from an open-source Github repository. <https://github.com/AmityCo/Amity-Social-Cloud-UIKit-Android-OpenSource>

![](/files/hkXM5iNXZMRZLLdyOXyT)

* Navigate to your current application in Android Studio, then at the top navigation bar go to **File > New > Import Module...**

![](/files/wLhO3xN73Pc9jzTUZsKF)

* Choose the source directory where you downloaded/cloned UI Kit source code.

![](/files/JSCGdbYbgUJGs45m5D4j)

* Make sure that you import `:chat` , `:common`, `:social`, and `:amity-uikit` module as per the screenshot described. The `:sample` module is optional and solely contains examples of UIKit Fragments and Activities.

![](/files/XgVRTembqJWBh3MA5iPc)

* Navigate to the root project's `settings.gradle` file once the modules have been successfully imported. You may see that Android Studio generated a dependency path from the UI Kit source code directory you specified initially. However, there's a chance that Android Studio won't do so or may generate the incorrect path. Please double-check that the path is accurate.

![](/files/2cj8lnnz4jSliwX2G3Dl)

* Additionally, in the root project's `settings.gradle` it's also mandatory to declare jitpack.io repository destination by adding `maven { url https://jitpack.io }` to **dependencyResolutionManagement > repositories**.

![](/files/j89rTm9PEwzmezBDarIt)

* Add the imported module to application's gradle file by adding:

```
implementation project(path: ':amity-uikit')
```

![](/files/3L1h0RPd3J8bJ3u207o5)

* Exclude these META-INF from the packaging options in application's gradle

```
 packagingOptions {
        exclude 'META-INF/INDEX.LIST'
        exclude 'META-INF/io.netty.versions.properties'
    }
```

* Lastly, apply this in the `project-level` build.gradle file. `apply from: "../Amity-Social-Cloud-UIKit-Android/buildsystem/dependencies.gradle"`

![](/files/sxaNBfO4WTSJ6aILqUJy)

{% hint style="info" %}
Also make sure that your settings `android.nonTransitiveRClass=false` in `gradle.properties` file.
{% endhint %}

Woohoo! All set now you're ready to explore and modify our UI Kit in your application project.

<figure><img src="/files/n4nQGRnUD65mXE82b7wL" alt=""><figcaption></figcaption></figure>

## Modifying Android Open Source UI Kit

You can modify the Android open-source UI Kit to customize behaviors to fit your needs. To modify the code, simply copy and paste it into your local machine.

We recommend that you first fork the repository before starting any customization work so that it will be easier to merge the code with the next version update that we provide from the main repository.

Reference on forking: <https://docs.github.com/en/get-started/quickstart/fork-a-repo>

## Get Latest Open Source UI Kit Updates

To update to the latest version of the UI Kit, you can pull the latest commit of the git submodule.

```
cd Amity-Social-Cloud-UIKit-Android-OpenSource
git pull origin master
cd ..
git add .
git commit -m “Update android uikit opensource submodule”
git push origin branch_name
```


---

# Agent Instructions: 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:

```
GET https://docs.social.plus/social-plus-uikit/uikit-3/android/android-uikit-installation-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
