OneSignal Help & Documentation

Welcome to the OneSignal New IA developer hub. You'll find comprehensive guides and documentation to help you start working with OneSignal New IA as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Support

Troubleshooting Android

Common setup issues with Android and Amazon

Troubleshooting
For Developers

Failed to resolve: com.onesignal:onesignal:[3.6.0, 3.99.99]

This means that Android Studio or Gradle could not download our plugin. Please check the following.
1. Open your browser to http://search.maven.org/ to make sure it loads on your system.
2. Make sure you're using Android Studio version 1.4.0 or newer.
3. Go to File > Settings.
4. Search for Offline work and uncheck this option.

4. Add the following to your .gradle file.

repositories {
    mavenCentral()
}

5. Try restarting Android Studio and then going to Tools > Android > Sync Project With Gradle Files.


Error:Execution failed for task ':app:processDebugGoogleServices'.

If you are receiving the following Android Studio error when building your project

Error:Execution failed for task ':app:processDebugGoogleServices'. 
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 9.0.0.

Remove the following line from your .gradle file.

apply plugin: 'com.google.gms.google-services'

Error: Failed to resolve: com.android.support:customtabs:[26.0.0,26.1.0)

Failed to resolve: com.android.support:customtabs:[26.0.0,26.1.0)
Could not resolve all dependencies for configuration ':appName:'.
   > Could not find any version that matches com.android.support:customtabs:[26.0.0,26.1.0).
     Versions that do not match:
         26.0.0-alpha1
         25.3.1
         + 19 more
     Required by:
         project :appName > com.onesignal:OneSignal:3.6.0

Please use one of the Options below to resolve the issue;

Option A

Add the new Google Maven repo to your Android Studio project.
Put maven { url 'https://maven.google.com' } under allprojects > repositories in your top level build.gradle as shown above.
You may need to update your compileSdkVersion to 26 in your app/build.gradle.

Option B

If you are not ready to update your project to the new support library yet and are still using targetSdkVersion 25 or lower you can follow the instructions below to use the 25 version of the com.android.support libraries.


Error: All gms/firesbase libraries must use the exact same version specification

All gms/firebase libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 11.0.4, 10.2.1. Examples include com.google.android.gms:play-services-base:11.0.4 and com.google.android.gms:play-services-gcm:10.2.1.

OneSignal automatically adds the following dependencies;

  • com.google.android.gms - Version 11
  • com.android.support - Version 26

If you get mixed version warnings like above in your build.gradle please make sure to update your other dependencies to match these versions.

If you must keep using an older version of these decencies add the following 4 lines, replacing the versions with the ones you require.

compile 'com.google.android.gms:play-services-gcm:11.0.+'
compile 'com.google.android.gms:play-services-location:11.0.+' 

compile 'com.android.support:support-v4:26.0.+'
compile 'com.android.support:customtabs:26.0.+'

Error:Execution failed for task ':app:processDebugManifest'

If you see the following error make sure you have completed step 1.2 correctly.

Execution failed for task ':app:processDebugManifest'
Manifest merger failed with multiple errors, see logs

No Users showing on the OneSignal dashboard

Please follow our No users on dashboard guide first.

Make sure you have your Application in your AndroidManifest.xml and add logging around OneSignal to make sure it is being called.
Make sure you have android:name=".ApplicationClass".

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme
android:name=".ApplicationClass">
public class ApplicationClass extends Application {

   @Override
   public void onCreate() {
      super.onCreate();
			
     	Log.d("OneSignalTag", "Before OneSignal init");
     
      OneSignal.setLogLevel(OneSignal.LOG_LEVEL.VERBOSE, OneSignal.LOG_LEVEL.NONE);
      OneSignal.startInit(this).init();

      Log.d("OneSignalTag", "After OneSignal init");
   }
}

(Missing Google Play Services Library) status on the Dashboard

  1. In Android Studio open build.gradle (Module: app) and make sure you are using the latest OneSignal SDK under dependencies.

How to get a crash or error log from an Android device

With Android Studio

1. Select Android Monitor from the bottom of the window.
------If you don't see this select it from View > Tool Windows > Android Monitor
2. Select your device from the drop down.
3. Ensure no filters are set and the type is set to Verbose.

4. Select all lines in the log by pressing Control + A and then copy them.
5. Paste them into a .txt file and send this to support. Include steps to reproduce the problem as well.

With the terminal / command line.

1. adb logcat -b all -d -v threadtime > onesignal_crash_logcat.txt
2. Send the onesignal_crash_logcat.txt to support. Include steps to reproduce the problem as well.

If you don't have adb in your path you will need to fully path to adb in the Android SDK. It is under <android-sdk>\platform-tools\adb.
If you don't have the Android SDK installed you can just download the SDK Platform Tools which contains the adb executable.


Eclipse - ERROR - "conversion to dalvik format failed with error 1"

If you're getting a conversion to dalvik format failed with error 1 error with Dx bad class file magic (cafebabe) or version (0033.0000) messages before this then you may have the wrong Java version set on your system. See the follow post to fix this as well as the other answers.
http://stackoverflow.com/a/9041471/1244574

Troubleshooting Android

Common setup issues with Android and Amazon

Troubleshooting
For Developers