Skip to main content

Development Environment

To build and develop NASA Explorer, you’ll need to set up your development environment with the following requirements.

Required Software

1

Android Studio

Install Android Studio Koala or a newer version. This is the official IDE for Android development and includes all necessary build tools.Download from: developer.android.com/studio
2

Java Development Kit

Install JDK 17 or higher. The project uses Java 1.8 compatibility but requires JDK 17+ for building.
# Verify your JDK version
java -version
3

Internet Connection

A stable internet connection is required for:
  • Consuming the NASA APOD API
  • Firebase Authentication and Realtime Database
  • Gradle dependency downloads

Android SDK Requirements

RequirementVersionAPI Level
Minimum SDKAndroid 8.0API 28
Target SDKAndroid 14API 34
Compile SDKAndroid 14API 34
The minimum SDK level is Android 8.0 (API 28), which covers approximately 95% of active Android devices.

API Keys and Services

NASA Explorer requires external services to function properly. You’ll need to obtain API keys and configure Firebase.

NASA API Key

1

Register for API Access

Visit api.nasa.gov and sign up for a free API key. The registration is instant and free.
2

Create local.properties

Create or edit the local.properties file in your project root directory:
nasaApiKey=YOUR_API_KEY_HERE
3

Verify Configuration

The API key is automatically injected into BuildConfig.NASA_API_KEY during build time via Gradle.
Never commit local.properties to version control. This file is included in .gitignore to protect your API keys.

Firebase Configuration

The application uses Firebase for authentication and data storage.
1

Create Firebase Project

Go to Firebase Console and create a new project.
2

Add Android App

Register an Android app with the application ID:
com.ccandeladev.nasaexplorer
3

Enable Services

Enable the following Firebase services:
  • Authentication - Email/Password provider
  • Realtime Database - For storing user favorites
4

Download Configuration

Download the google-services.json file and place it in:
app/google-services.json
The google-services.json file contains sensitive configuration data and is excluded from the repository via .gitignore.

Gradle Configuration

The project uses Gradle version catalogs for dependency management.

Key Dependencies

[versions]
agp = "8.5.2"
kotlin = "2.0.0"
hilt = "2.49"
retrofit = "2.9.0"
navigationCompose = "2.8.0"
firebaseDatabaseKtx = "21.0.0"

Memory Settings

Gradle is configured to use up to 2GB of heap memory. If you encounter build issues on machines with limited RAM, you can adjust this in gradle.properties:
org.gradle.jvmargs=-Xmx1536m -Dfile.encoding=UTF-8

Hardware Requirements

Minimum Requirements

  • RAM: 8 GB (16 GB recommended for optimal performance)
  • Storage: 8 GB free space for Android Studio and SDK
  • Processor: Intel Core i5 or equivalent

Testing Devices

You can test the application on:
  • Physical Device: Any Android device running Android 8.0 (API 28) or higher
  • Emulator: Android Virtual Device (AVD) configured with:
    • API Level 28 or higher
    • At least 2 GB RAM
    • Google Play Services (for Firebase)
Physical devices provide better performance and more accurate testing results, especially for UI interactions and network requests.

Verification

After setting up your environment, verify everything is configured correctly:
1

Open Project

Open the project in Android Studio and wait for Gradle sync to complete.
2

Check Configuration

Ensure these files exist and are properly configured:
  • local.properties (with NASA API key)
  • app/google-services.json (Firebase configuration)
3

Build Project

Build the project to verify all dependencies are resolved:
./gradlew build
If the build completes successfully, your environment is ready for development.

Build docs developers (and LLMs) love