This guide provides multiple methods to build the Nano.ai Android application.
Easiest method - No setup required!
- Open the Colab notebook: Build_Nano_AI.ipynb
- Click "Open in Colab" button
- Run all cells (Runtime → Run all)
- Wait 10-15 minutes
- Download the APK when complete
Advantages:
- ✅ No local setup needed
- ✅ Free (uses Google's servers)
- ✅ Works on any device with a browser
- ✅ Clean build environment
Best for continuous integration
- Push code to GitHub
- Go to Actions tab
- Wait for build to complete
- Download APK from artifacts
git tag v0.0.1
git push origin v0.0.1This automatically creates a GitHub release with the APK.
Workflows:
.github/workflows/build.yml- Builds on every push.github/workflows/release.yml- Creates releases on tags
For development and testing
- Java 17 JDK
- Android SDK
- 8GB+ RAM recommended
Debug APK:
./gradlew assembleDebugRelease APK:
./gradlew assembleReleaseClean build:
./gradlew clean assembleDebugOutput location:
app/build/outputs/apk/debug/app-debug.apk
app/build/outputs/apk/release/app-release.apk
| Build Type | Package Name | Min SDK | Target SDK |
|---|---|---|---|
| Debug | com.nano.ai | 31 | 36 |
| Release | com.nano.ai | 31 | 36 |
APK Size: ~50-100 MB (varies with included models)
Problem: Gradle build fails
# Clear Gradle cache
./gradlew clean
rm -rf .gradle
./gradlew assembleDebugProblem: SDK not found
- Set
ANDROID_HOMEenvironment variable - Install Android SDK via Android Studio
Problem: Out of memory
# Increase Gradle memory
export GRADLE_OPTS="-Xmx4g -XX:MaxMetaspaceSize=512m"
./gradlew assembleDebugProblem: Build timeout
- Runtime → Restart runtime
- Run cells again (cache will help)
Problem: Download fails
- Check browser's download settings
- Try downloading from Files panel (left sidebar)
Problem: Workflow not running
- Check if Actions are enabled in repository settings
- Verify branch name matches workflow triggers
Problem: Build fails in Actions
- Check workflow logs for detailed errors
- Download build-reports artifact for more info
keytool -genkey -v -keystore nano-ai.keystore \
-alias nano-ai -keyalg RSA -keysize 2048 -validity 10000jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 \
-keystore nano-ai.keystore \
app/build/outputs/apk/release/app-release-unsigned.apk nano-aijarsigner -verify -verbose -certs \
app/build/outputs/apk/release/app-release-unsigned.apk| Method | Time | Setup | Difficulty |
|---|---|---|---|
| Google Colab | 10-15 min | None | ⭐ Easy |
| GitHub Actions | 8-12 min | Minimal | ⭐⭐ Easy |
| Local Build | 5-10 min | Complex | ⭐⭐⭐ Medium |
For Users:
- Use Google Colab for one-time builds
- Download from GitHub Releases for stable versions
For Developers:
- Use local builds for development
- Use GitHub Actions for CI/CD
- Use Colab for testing without local setup
- Debug APKs are unsigned and can be installed directly
- Release APKs should be signed for distribution
- First build takes longer due to dependency downloads
- Subsequent builds are faster with Gradle cache
Need Help? Open an issue on GitHub