Skip to main content

Choicely RN — Android Integration Guide

Integrate the Choicely React Native SDK into your native Android project.
This guide targets the published SDK artifacts listed below and is verified against them. It is for teams embedding Choicely into an existing native Android app. If you want to build and publish an app without writing code, use Choicely Studio instead.

Versions


Prerequisites

  • Node.js >= 20
  • Android SDK with CMake
  • Git
  • Java 17

Project Structure (after setup)


Setup

Step 1 — Clone the Choicely RN repo

The folder must be named app-react-native by default. To use a different name, set choicelyRnDir in gradle.properties (see Step 2).

Step 2 — gradle.properties


Step 3 — settings.gradle

Why includeBuild and reactSettings can’t be automated by a plugin: They run in Gradle’s settings phase — before any plugin from Maven Central can load. These will always need to be in your settings.gradle.

Step 4 — Root build.gradle


Step 5 — App build.gradle


Also needed — react-native.config.js

File: app-react-native/react-native.config.js
Must use dots in the filename — NOT react-native-config.js.

Step 5b — Required app colours

The Choicely SDK themes reference these. Without them the build fails at Android resource linking failed … resource color/colorPrimaryDark not found. File: app/src/main/res/values/colors.xml

Step 6 — MyApplication.java

Extend ChoicelyRNApplication instead of Application and initialise both the RN engine and the Choicely SDK.

Bundle loading explained


Artifacts Overview

Gradle Plugin: com.choicely.sdk:choicely-rn-gradle

Distributed via Maven Central Snapshots. Provides two plugin IDs:

Runtime Library: com.choicely.sdk:android-rn

AAR library containing: Transitive dependencies (pulled automatically):
  • com.choicely.sdk:android-core
  • com.facebook.react:react-android:0.82.0
  • com.facebook.react:hermes-android:0.82.0
  • androidx.databinding:*:8.13.0
  • org.jetbrains.kotlin:kotlin-stdlib:2.1.21

Build Commands


Renaming the RN folder

Change one line in gradle.properties:

What the Gradle plugin handles automatically

What still requires manual setup (Gradle hard limits)


Troubleshooting