Here are some of the errors that you may encounter in the various stages of setting up Hengam SDK in Unity, along with the solution.

These errors fall into two categories: 1. Errors before running the app while compiling or building 2. Errors while running the application

Errors while compiling or building the app

Gradle failed

To find out exactly where the problem is (Gradle error has many different causes) you should check the Unity Log. The error is usually explained within the stderr [] block

One of the reasons may be:

  • Duplicate Entry A library may be added to the application twice. Check the mainTemplate.gradle file and find the duplicated library.

Errors while running the application

App is paused before logo display

If this happens, the MultiDex should probably be added to the app. It could be because the program has encountered a Dex limit error.

What is Dex error? On Android, the number of possible methods for each application is 64K standard. If the method exceeds this number, the program will encounter an error. for solving this problem:

  • If you have MinSDKVersion 21 or higher you do not need to do anything and you will have no errors.
  • If MinSDKVersion is lower than 21 you should enable MultiDex.

First make sure the multiDexEnabled true statement is added to the dafaultConfig block.

defaultConfig {
    multiDexEnabled true

Then in the AndroidManifest file, add the following statement to the <application> attributes:

This article can be helpful. It is also described in the SDK Integration section to solve this issue using Hengam classes.

If the app crashes in different step, you should check what the output log of your app is.

The internal crashes of Hengam library do not close the application.

Can't you find the error on this page? Search the Issues section of the Github and if you find nothing, create a new issue there.