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    Discussions

Troubleshooting Unity

Common setup issues with Unity (iOS, Android (and derivatives like Amazon) and Windows Phone 8.1.

Troubleshooting
For Developers

Google Play Services Library missing

Android, Amazon

1. Run Assets > Play Services Resolver > Android Resolver > Force Resolve from the menu bar.

2. You should now see the following .aar and .jar files in your Assets/Plugins/Android folder.

3. If these files do not appear check the Unity log for errors and follow the JarResolover error instructions below.

Done! Please check the other sections below if you still see an error. If the problem persists, send your console log, Unity version, and other plugins in your project to OneSignal. support.


Android Build Error: android:keyboardNavigationCluster OR android:font

You will get the following error in Unity if you are NOT using the latest Android target.

CommandInvokationFailure: Gradle build failed. 
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java
   -classpath "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-4.0.1.jar"
   org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m"
   "assembleRelease"
stderr[
   UnityProjectDir/Temp/gradleOut/build/intermediates/res/merged/release/values-v26/values-v26.xml:15:21-54:
      AAPT: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.    
   UnityProjectDir/Temp/gradleOut/build/intermediates/res/merged/release/values-v26/values-v26.xml:15:
      error: Error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.

OR

CommandInvokationFailure: Gradle build failed. 
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java -classpath "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-4.0.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"

stderr[
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
  1. Updated to Unity 2017
    • Tested with Unity 2017.4.0f1, might work on older versions
  2. Update Android SDK
    • Platform-Tools 27+
    • Build Tools 27+ (Without 28.0.0-rc1)
  3. File > Build Settings.. > Player Settings... > Target API Level
    • Set as Automatic (highest installed)

This is an issue with the Unity Jar Resolver, more details in on issue 111.


"No resource found that matches the given name" build errors

Android, Amazon

You may receive errors like the following if your project's path is to long.

C:\full\path\to\project\Temp\StagingArea\android-libraries\play-services-base-9.4.0\res\drawable\common_google_signin_btn_text_light.xml:12: error:
Error: No resource found that matches the given name (at 'drawable' with value '@drawable/common_google_signin_btn_text_light_normal').

Close Unity and move your project to the root of your drive. Then open the new location in Unity and build again.


Xcode - Undefined symbols for architecture xxxx - OneSignal

iOS

  1. If you are seeing the following error then the OneSignal library was not correctly enabled for iOS builds.

    Undefined symbols for architecture arm64: "_OBJC_CLASS_$_OneSignal", referenced from: objc-class-ref in OneSignalUnityRuntime.o ld: symbol(s) not found for architecture arm64

  2. Make sure iOS is checked on Assets/OneSignal/Platforms/iOS/libOneSignal under the inspector view.

  3. Rebuild from Unity then rebuild in Xcode.


Android - Too many field references to fit in one dex file

trouble writing output: Too many field references to fit in one dex file: 71720; max is 65536.
You may try using multi-dex. If multi-dex is enabled then the list of classes for the main dex list is too large.

This means there are too many Java methods in all the libraries (and it's decencies) to build the app.

We recommend switching to the new Gradle "Build System" introduced in Unity 2017.2 to resolve this issue. This is under File > Build Settings > Build System and select Gradle.

If this does not solve the issue you can try these additional options.


Build error with Facebook SDK

Android

Make sure you have the latest Facebook SDK version. Version 7.11.1 or newer is required
https://developers.facebook.com/docs/unity

com/google/firebase/messaging/cpp/RegistrationIntentService not found

Android

Update to Firebase 5.3.1 (Released Oct. 3 2018)
https://firebase.google.com/docs/unity/setup