> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gameball.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> Install Gameball Android SDK v3.1.1 and set up your project

# Installation & Setup

This guide helps you set up your project and install the **Gameball Android SDK v3.1.1**.\
After completing these steps, proceed to **Initialize the SDK** to start using Gameball in your app.

***

## Requirements

Your project must meet the following minimum requirements:

* **Minimum SDK Version:** 21 (Android 5.0)
* **Target SDK Version:** 34
* **Kotlin:** 2.0.0+
* **AndroidX:** Required
* **Internet permission** in your `AndroidManifest.xml`:

```xml theme={null}
<uses-permission android:name="android.permission.INTERNET" />
```

***

## Install the SDK

### 1. Add Repositories

Add the required repositories to your **project-level** `settings.gradle` (or `build.gradle` for older projects):

```groovy theme={null}
dependencyResolutionManagement {
  repositories {
    google()
    mavenCentral()
    maven { url "https://jitpack.io" }
    maven { url 'https://developer.huawei.com/repo/' }
  }
}
```

<Info>
  If your project uses an older Gradle configuration, add these repositories under: `allprojects { repositories { ... } }`.
</Info>

***

### 2. Add the Gameball Dependency

In your **app-level** `build.gradle`:

```groovy theme={null}
dependencies {
  implementation 'com.gameball:gameball-sdk:3.1.1'
}
```

***

### 3. (Optional) Maven Installation

If you are using Maven:

```xml theme={null}
<dependency>
  <groupId>com.gameball</groupId>
  <artifactId>gameball-sdk</artifactId>
  <version>3.1.1</version>
</dependency>
```

***

## ProGuard / R8 Configuration

If you are using ProGuard or R8, add the following rules to your [proguard-rules.pro](http://proguard-rules.pro):

```proguard theme={null}
# Gameball SDK
-keep class com.gameball.gameball.** { *; }
-keep class com.gameball.gameball.model.** { *; }

# Gson
-keepattributes Signature
-keepattributes *Annotation*
-keep class com.google.gson.** { *; }
```

<Info>
  The SDK automatically enables debug logging in debug builds. Network requests and responses are logged when `BuildConfig.DEBUG` is `true`.
</Info>

***

## Troubleshooting Setup

<AccordionGroup>
  <Accordion title="Dependency Not Found">
    **Symptoms:** Gradle cannot resolve `com.gameball:gameball-sdk:3.1.1`. **Solutions:**

    * Ensure `jitpack.io` and Huawei repos are added under `repositories`.
    * Sync Gradle again from Android Studio.
    * Check for typos in the dependency coordinates.
  </Accordion>

  <Accordion title="Network Errors After Installation">
    **Symptoms:** Calls fail or time out after integrating the SDK. **Solutions:**

    * Verify `INTERNET` permission is present in `AndroidManifest.xml`.
    * Check network connectivity on the test device/emulator.
    * Confirm your API key is correct in the Gameball dashboard (once you initialize the SDK).
  </Accordion>
</AccordionGroup>

***

## Debug Logging

The SDK logs useful information when BuildConfig.DEBUG is true.

### Logcat Tags

| **Tag**              | **Description**                      |
| :------------------- | :----------------------------------- |
| `GameballApp`        | General SDK operations and lifecycle |
| `LoggingInterceptor` | Network requests and responses       |
| `HeaderInterceptor`  | Request headers and authentication   |

#### Example:

```bash theme={null}
adb logcat -s GameballApp LoggingInterceptor HeaderInterceptor
```

<Tip>
  No extra configuration is required, debug logs are automatically enabled in debug builds.
</Tip>

## Next Steps

* [Initialize SDK](/installation-guides/v3/android/initialize-sdk)
* [Initialize Customer Profile](/installation-guides/v3/android/initialize-profile)
