System Requirements
Development Environment
Android Studio
Koala (2024.1.1) or newer
Java Development Kit
JDK 17 or newer
Gradle
8.7 (included with Android Studio)
Kotlin
2.0.0 or newer
Target Platform
- Minimum SDK: Android 8.0 (API 26)
- Target SDK: Android 14 (API 34)
- Compile SDK: API 34
Hardware Requirements
- RAM: 8 GB minimum, 16 GB recommended
- Storage: 4 GB free space for Android Studio and SDKs
- Processor: 64-bit processor required
Installation Steps
Install Android Studio
Download and install Android Studio Koala or newer:
- Visit developer.android.com/studio
- Download the installer for your operating system
- Run the installer and follow the setup wizard
- Install the Android SDK and emulator (if prompted)
Make sure to install the Android SDK Command-line Tools during setup.
Install JDK 17
Verify or install JDK 17:Check your Java version:If you need to install JDK 17:
- Windows/macOS/Linux: Download from Oracle or Adoptium
- macOS (Homebrew):
brew install openjdk@17 - Linux (apt):
sudo apt install openjdk-17-jdk
- Go to File → Project Structure → SDK Location
- Set the JDK location to your JDK 17 installation
Open project in Android Studio
- Launch Android Studio
- Click File → Open (or Open an Existing Project from welcome screen)
- Navigate to the cloned
NASAExplorerdirectory - Click OK
- Index the project files
- Download Gradle dependencies
- Configure the Android SDK
The initial sync may take 5-10 minutes depending on your internet connection.
Configure NASA API credentials
Get Your API Key
- Visit https://api.nasa.gov/
- Fill out the API key request form with:
- First Name
- Last Name
- Email address
- Check your email for the API key (arrives instantly)
Add to Project
- Create a file named
local.propertiesin the project root directory - Add your API key:
local.properties
Verify Configuration
The API key is injected into the app via BuildConfig:build.gradle.kts
Configure Firebase
Create Firebase Project
- Go to Firebase Console
- Click Add project or Create a project
- Enter project name:
NASA Explorer(or your preferred name) - Accept the terms and click Continue
- Disable Google Analytics (optional for this app)
- Click Create project
Add Android App
- In your Firebase project, click the Android icon
- Register your app with package name:
com.ccandeladev.nasaexplorer - (Optional) Add a nickname: “NASA Explorer Android”
- (Optional) Add SHA-1 signing certificate for production
- Click Register app
Download Configuration File
- Download
google-services.jsonfrom the Firebase Console - Place the file in your project at:
Enable Authentication
- In Firebase Console, go to Build → Authentication
- Click Get started
- Select Email/Password sign-in method
- Enable Email/Password
- Click Save
Enable Realtime Database
- In Firebase Console, go to Build → Realtime Database
- Click Create Database
- Select a location (choose closest to your users)
- Start in Test mode for development
- Click Enable
Sync and build
Sync Gradle and build the project:
- In Android Studio, click File → Sync Project with Gradle Files
- Wait for the sync to complete (check the status in the bottom-right corner)
- Once synced, click Build → Make Project
Run the application
Set Up Device/Emulator
Option 1: Physical Device- Enable Developer Options on your Android device
- Enable USB Debugging
- Connect device via USB
- Accept the debugging authorization prompt
- Click Tools → Device Manager
- Click Create Device
- Select a device (e.g., Pixel 5)
- Select a system image (API 26 or higher)
- Click Finish
Launch the App
- Select your device from the device dropdown
- Click the Run button (▶️) or press
Shift + F10 - Wait for the build to complete
- The app will install and launch automatically
First launch may take longer as Gradle builds the project and installs on the device.
Verify Installation
After launching the app, verify that everything works:Test User Registration
Test User Registration
- On the login screen, click Sign Up
- Enter an email and password (min 6 characters)
- Click Register
- You should be redirected to the home screen
Test NASA API Connection
Test NASA API Connection
- Navigate to the Daily Image tab
- You should see today’s Astronomy Picture of the Day
- If you see an error, verify your NASA API key in
local.properties
Test Firebase Integration
Test Firebase Integration
- View an image and click the favorite icon (heart)
- Navigate to the Favorites tab
- Your saved image should appear with the option to add comments
- If favorites don’t save, check Firebase Realtime Database rules
Project Structure
After installation, your project structure should look like this:Common Issues
Gradle sync fails
Gradle sync fails
Solution:
- Check your internet connection
- Verify JDK 17 is configured in Android Studio
- Try File → Invalidate Caches → Invalidate and Restart
- Delete
.gradlefolder and sync again
NASA_API_KEY not found error
NASA_API_KEY not found error
Solution:
- Verify
local.propertiesexists in project root (not inapp/directory) - Check the file contains:
nasaApiKey=YOUR_KEY - Sync Gradle: File → Sync Project with Gradle Files
- Rebuild: Build → Rebuild Project
google-services.json missing error
google-services.json missing error
Solution:
- Verify the file is in
app/google-services.json(not in project root) - Check the package name in the file matches:
com.ccandeladev.nasaexplorer - Re-download from Firebase Console if needed
- Sync Gradle again
Firebase authentication fails
Firebase authentication fails
Solution:
- Verify Email/Password auth is enabled in Firebase Console
- Check that your
google-services.jsonis from the correct Firebase project - Ensure your device/emulator has internet connectivity
- Check Firebase Console for error logs
Out of memory during build
Out of memory during build
Solution:
Increase Gradle memory in
gradle.properties:Next Steps
Quickstart Guide
Quick reference for getting started
NASA API Configuration
Learn about API endpoints and usage
Firebase Setup
Detailed Firebase configuration guide
Security Best Practices
Protect your credentials and data