-
Android Studio (recommended version: Hedgehog | 2023.1.1 or newer)
- Download from: https://developer.android.com/studio
-
Android SDK
- Minimum SDK: API 26 (Android 8.0)
- Target SDK: API 34 (Android 14)
- Build Tools: 34.0.0
-
Java Development Kit (JDK)
- JDK 8 or higher (JDK 17 recommended)
-
Open the project:
File → Open → Select the kickr_android directory -
Sync Gradle:
- Android Studio will automatically prompt to sync Gradle
- Or click: File → Sync Project with Gradle Files
-
Connect your Android device:
- Enable Developer Options on your device:
- Go to Settings → About Phone
- Tap "Build Number" 7 times
- Enable USB Debugging:
- Go to Settings → Developer Options
- Enable "USB Debugging"
- Connect via USB cable
- Enable Developer Options on your device:
-
Run the app:
- Click the "Run" button (green triangle) or press Shift+F10
- Select your device from the list
-
Build the APK:
cd /home/aothmane/Documents/privat/kickr_android ./gradlew assembleDebug -
Install on device:
./gradlew installDebug
-
Build and install in one step:
./gradlew installDebug
The APK will be generated at:
app/build/outputs/apk/debug/app-debug.apk
If you don't have the Gradle wrapper installed:
cd /home/aothmane/Documents/privat/kickr_android
# Download Gradle wrapper
gradle wrapper --gradle-version 8.2
# Make gradlew executable
chmod +x gradlewFor development and testing without a real Kickr Core trainer, you can:
- Use a Bluetooth LE simulator app on another device
- Modify the device filter to connect to any BLE device with Cycling Power Service
- Use the Android Emulator with Bluetooth support (requires specific setup)
Problem: SDK location not found
# Create local.properties file
echo "sdk.dir=/path/to/Android/Sdk" > local.propertiesProblem: Gradle sync failed
# Clean and rebuild
./gradlew clean
./gradlew build --refresh-dependenciesProblem: App crashes on startup
- Check that your device has Android 8.0 or higher
- Verify Bluetooth permissions in Settings → Apps → Kickr Trainer → Permissions
Problem: Cannot scan for devices
- Ensure Bluetooth is enabled
- Grant location permissions (required for BLE scanning on Android 10-11)
- For Android 12+, grant Bluetooth scan/connect permissions
If you need to change the build configuration:
Edit app/build.gradle.kts:
android {
compileSdk = 34 // Change SDK versions here
defaultConfig {
minSdk = 26
targetSdk = 34
// ...
}
}-
Generate a keystore (first time only):
keytool -genkey -v -keystore kickr-release-key.jks \ -keyalg RSA -keysize 2048 -validity 10000 \ -alias kickr-key
-
Create
keystore.properties:storePassword=yourStorePassword keyPassword=yourKeyPassword keyAlias=kickr-key storeFile=../kickr-release-key.jks
-
Update
app/build.gradle.ktsto use the keystore (if needed) -
Build release APK:
./gradlew assembleRelease
The signed APK will be at:
app/build/outputs/apk/release/app-release.apk
- Kotlin style guide: https://kotlinlang.org/docs/coding-conventions.html
- Use 4 spaces for indentation
- Maximum line length: 120 characters
# Run unit tests
./gradlew test
# Run instrumented tests (requires connected device)
./gradlew connectedAndroidTest- Use Android Studio's debugger with breakpoints
- View Bluetooth logs:
adb logcat -s "KickrBluetoothService" - Monitor all logs:
adb logcat
# View connected devices
adb devices
# Install APK manually
adb install -r app/build/outputs/apk/debug/app-debug.apk
# View app logs
adb logcat -s "KickrBluetoothService"
# Clear app data
adb shell pm clear com.kickr.trainer
# Uninstall app
adb uninstall com.kickr.trainer- Package Name: com.kickr.trainer
- Min SDK: 26 (Android 8.0 Oreo)
- Target SDK: 34 (Android 14)
- Language: Kotlin
- Build System: Gradle with Kotlin DSL
For issues or questions:
- Check the logs:
adb logcat - Review the README.md for common issues
- Verify all permissions are granted
- Ensure your Kickr Core is powered on and not connected to other devices