Quickstart Guide
Get the Space Flight News app running on your Android device or emulator in just a few steps.Prerequisites
Before you begin, ensure you have the following installed:- Android Studio (Arctic Fox or newer recommended)
- JDK 11 or higher
- Android SDK with API level 24-35
- Git for cloning the repository
The app requires minimum SDK 24 (Android 7.0) and targets SDK 34.
Step 1: Clone the Repository
Step 2: Configure Build Environment
The project uses Kotlin DSL for Gradle configuration. No additional setup is required - the build configuration is already optimized:build.gradle.kts
Step 3: Sync Dependencies
The app uses several key dependencies that will be downloaded automatically:- Dagger Hilt for dependency injection
- Retrofit for API calls
- Room for local database
- Jetpack Navigation for screen navigation
- Glide for image loading
- Coroutines for asynchronous operations
Step 4: Set Up an Android Device
Choose one of the following options:- Physical Device
- Emulator
Using a Physical Device
-
Enable Developer Options on your Android device:
- Go to Settings > About Phone
- Tap Build Number 7 times
-
Enable USB Debugging:
- Go to Settings > Developer Options
- Toggle on USB Debugging
- Connect your device via USB
- Accept the debugging authorization prompt on your device
Step 5: Run the App
Verify Installation
Once the app launches, you should see:- A list of space flight news articles with images
- A search icon in the toolbar
- Pull-down to refresh functionality
- Infinite scroll - new articles load as you scroll down
If you see articles loading, congratulations! The app is running successfully.
App Components at Startup
Application Class
The app starts with theMyApp class annotated with @HiltAndroidApp:
MyApp.kt
Dependency Injection
Hilt automatically provides dependencies like the Retrofit client:NetworkModule.kt
Main Activity
The single activity hosts all fragments using Jetpack Navigation:AndroidManifest.xml
Required Permissions
The app requests these permissions at runtime:AndroidManifest.xml
- INTERNET: Required for fetching articles from the API
- ACCESS_NETWORK_STATE: Checks network availability
- RECORD_AUDIO: Enables voice search functionality
- POST_NOTIFICATIONS: Allows the app to send notifications
Troubleshooting
Build fails with 'Java version' error
Build fails with 'Java version' error
Ensure Android Studio is using JDK 11:
- Go to File > Project Structure
- Under SDK Location, set Gradle JDK to version 11 or higher
- Click Apply and rebuild
App crashes on launch
App crashes on launch
Check the Logcat output for error messages:
- Open Logcat in Android Studio (View > Tool Windows > Logcat)
- Filter by your app’s package name
- Look for red error messages or stack traces
- Missing internet permission (should be granted automatically)
- API connectivity issues (check your device’s internet connection)
No articles appear
No articles appear
This could be due to:
- No internet connection: Check your device/emulator has internet access
- API issues: The Space Flight News API might be temporarily unavailable
- Network error: Check Logcat for network-related errors
- Pull down to refresh
- Check the device’s internet connection
- Restart the app
Gradle sync fails
Gradle sync fails
- Click File > Invalidate Caches and restart
- Delete
.gradlefolder in project root - Click File > Sync Project with Gradle Files
- If issues persist, update Gradle wrapper:
Next Steps
Now that you have the app running, explore these topics:Architecture
Deep dive into the clean architecture implementation
Core Features
Explore article list, search, and pagination features
API Reference
Explore the repository and API client documentation
Data Layer
Learn about data management and persistence