# Troubleshooting Initialization

Troubleshoot common initialization issues and apply solutions.

When following steps in [Getting Started](https://www.airship.com/docs/developer/sdk-integration/android/installation/getting-started/) or [Advanced Integration](https://www.airship.com/docs/developer/sdk-integration/android/installation/advanced-integration/), if you don't see a channel ID in the logs or encounter errors during initialization, review the following common problems and solutions.

## Initialization errors

The Airship SDK fails during initialization or behaves unexpectedly in these cases:

- `takeOff` has already been successfully called.
- `takeOff` was called but the SDK was not configured through Autopilot or `airshipconfig.properties`.
- Autopilot or `airshipconfig.properties` has invalid or missing credentials.
- Required dependencies are missing from the `build.gradle` file.
- `takeOff` was called before the application context was available.

## takeOff called multiple times

If `takeOff` throws because it has already been successfully called, verify the following:

- `takeOff` is only called once per app launch.
- It's not called in both `Autopilot` and `Application.onCreate()`.

## Credential validation

During initialization, the SDK checks only that credentials are present and correctly formatted in code, through `Autopilot`, or in `airshipconfig.properties`. It does not verify that the credentials are valid against Airship servers. If the configuration is valid and you initialize the SDK only once, initialization can complete without reporting an error even when the credentials themselves are invalid.

The credentials the SDK uses at initialization, whether you call `takeOff` yourself or configure the SDK through `Autopilot` or `airshipconfig.properties`, are your Airship project's [App Key](https://www.airship.com/docs/reference/glossary/#app_key) and [App Secret](https://www.airship.com/docs/reference/glossary/#app_secret). To find them, select the dropdown menu () next to your project name, and then **Project details**.

**Symptoms of missing or invalid credentials:**

- No channel ID appears in the logs
- Warnings or errors in the logs after initialization
- Channel is not created in the Airship dashboard
- Push notifications are not received

If you are experiencing credential issues, do the following:

1. Compare your Airship project credentials with the values in your app, either in code, through `Autopilot`, or in `airshipconfig.properties`.
   - Credentials must match the expected format and character set.
   - Credentials must not be empty strings or contain extra whitespace.
1. Ensure both `productionAppKey`/`productionAppSecret` and `developmentAppKey`/`developmentAppSecret` are set in code, through `Autopilot`, or in `airshipconfig.properties` before the SDK initializes.

**Guidelines for credentials:**

- Use development credentials for development builds and production credentials for release builds.
- Configure both development and production credentials in your app, either in code, through `Autopilot`, or in `airshipconfig.properties`. The SDK chooses which to use based on your build configuration.

## airshipconfig.properties not found or invalid

If the SDK cannot load or parse `airshipconfig.properties`, or the file is invalid, verify the following:

- The file exists in your app's `src/main/assets/` directory
- The file name is exactly `airshipconfig.properties`
- All required keys are present: `productionAppKey`, `productionAppSecret`, `developmentAppKey`, `developmentAppSecret`
- The file format is valid (it must be in standard Java properties format)
- The file is included in your build output

## FCM configuration issues

If push notifications are not working or you need to confirm your FCM integration, verify the following:

- The `google-services.json` file is configured for your app and Firebase project
- The FCM dependency is included in your `build.gradle` file
- The Google Services plugin is applied in your `build.gradle` file
- The Firebase project is set up correctly in the Firebase Console