Installation & Setup
This guide helps you set up your project and install the Gameball Android SDK v3.1.0.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:
Install the SDK
1. Add Repositories
Add the required repositories to your project-levelsettings.gradle (or build.gradle for older projects):
If your project uses an older Gradle configuration, add these repositories under:
allprojects { repositories { ... } }.2. Add the Gameball Dependency
In your app-levelbuild.gradle:
3. (Optional) Maven Installation
If you are using Maven:ProGuard / R8 Configuration
If you are using ProGuard or R8, add the following rules to your proguard-rules.pro:The SDK automatically enables debug logging in debug builds. Network requests and responses are logged when
BuildConfig.DEBUG is true.Troubleshooting Setup
Dependency Not Found
Dependency Not Found
Symptoms: Gradle cannot resolve
com.gameball:gameball-sdk:3.1.0. Solutions:- Ensure
jitpack.ioand Huawei repos are added underrepositories. - Sync Gradle again from Android Studio.
- Check for typos in the dependency coordinates.
Network Errors After Installation
Network Errors After Installation
Symptoms: Calls fail or time out after integrating the SDK. Solutions:
- Verify
INTERNETpermission is present inAndroidManifest.xml. - Check network connectivity on the test device/emulator.
- Confirm your API key is correct in the Gameball dashboard (once you initialize the SDK).
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 |