Guide
Troubleshooting
Start from what you see: no ad, no banner, a failed build, no reward. Every error code and detail, with its cause and fix, is on the Errors page of the reference.
No ad shows #
Read error.code and error.detail in your onFailed or onShowFailed, then:
| You get | Check |
|---|---|
RENDER_NOT_AVAILABLE / render.absent |
nga-sdk-render (Android), the NGASDKRender product (iOS) or network.nga.sdk-render (Unity) is missing from the build. |
RENDER_NOT_AVAILABLE / render.version_mismatch |
the two libraries are at different versions, or come from two builds of one version (two candidates, or the release and a candidate before 0.1.0-rc.6). Use one release for both. |
NOT_INITIALIZED |
initialize was not called, or it failed. Look at what onInitialized reported. |
INVALID_CONFIG / app_key.* |
the app key is mistyped, from another game, or the release build's package name or bundle id is not the one registered for the game in the portal. |
INVALID_PLACEMENT |
the placement id is mistyped (placement.format), or it is not one of this game's placements in the portal (placement.unknown). |
NO_FILL |
a normal answer: see No fill while testing. retryAfterMillis says when to ask again. If a game that was served gets only no_fill.decision while your portal shows nothing switched off or stopped, NGA may have turned its ads off: ask NGA (When NGA turns a game off). |
DISABLED |
the app key is switched off, or this SDK version or build is retired. Loaded ads expire too. |
ACTIVITY_NOT_RESUMED |
the screen you passed to show is not in front. Show from the screen in front; the ad stays ready. |
ALREADY_SHOWING |
another NGA ad of the same kind is on screen. Wait for its onClosed, or close the banner first. |
EXPIRED |
the ad was loaded more than 30 minutes ago. Load again. |
INVALID_SHOW_TARGET |
the window is too small for the banner (show.target.window_too_small), or your banner yield's hide threw (show.target.yield_failed). The ad stays ready. |
RENDER_FAILED |
the show ended in a failure inside the SDK (render.crashed, render.input, render.exception). Load again; if it repeats, send NGA the DEBUG log (Asking NGA). |
Every code and detail, with its cause and fix: Errors.
Neither onLoaded nor onFailed called? Every load calls back exactly once per callback, so check that loadAd ran and that your callback object was not replaced.
The banner does not appear, or appears in the wrong place #
- No
onLoaded. See No ad shows above. Until NGA has first read your game's store listing, its native placements get no fill (What the banner shows). showcalled, no banner, andonShowFailed. The screen was not in front, another banner was up, or the window is too small. The ad stays ready; the causes, and when to show again, are in Show lifecycle.- The banner covers your own banner ad. Register the banner yield once at start; without it, the first native show logs one
WARN. With it registered, check that itshidereaches the view that is on screen (a banner ad created during a yield starts hidden in the examples). - Your banner ad does not come back, or stops refreshing, after NGA's banner. Your
restoremust show it again and resume its refresh whenever the banner is allowed now, not only when it was refreshing athide; see the examples under Your own banner ad. - The banner covers your own UI. Show it only where nothing else is at the bottom of the screen, and call
close()before you put anything there. The SDK has no position or offset for it. See Where the banner may show. - Unity: the banner stays across scenes. This is expected. Call
Close()when you leave the screen that showed it. - Unity: the game covers the banner. Turn off Render Over Native UI; the build check enforces it.
RENDER_FAILED / render.input. The banner could not draw what it received. The show ends; load another.- The banner shows NGA's default colors, not your game's. NGA could not read colors from your game's listing. Check the game's Overview in the portal, which shows what NGA read.
The build fails #
- Unity says
NGA SDK: this build cannot run the NGA SDK.Each line names a fix; see Unity build checks. - Unity 2022.3: an Android build stops with
Unity 2022.3… builds this Android release build without minify(ordevelopment build). With 0.1.0-rc.2 or earlier, a release build fails later, at the dexing step, withERROR:D8: com.android.tools.r8.kotlin.H(inDexingWithClasspathTransform) onkotlin-stdlibor the NGA libraries. Cause: Minify is off for that build type (Unity's default). Fix: turn on Minify > Release, and Minify > Debug for development builds, as in Install, step 3 for Unity. - Unity 2022.3: the Android build fails at the dexing step after you add MAX 13 or LevelPlay 9.6 or later. Fix: add R8 to
settingsTemplate.gradle, as in Install, step 4 for Unity. - Unity: the Package Manager cannot add the Git URL. Cause: Git is not installed or not on the
PATHUnity sees, or the URL or tag is mistyped. Both URLs end in#v0.1.0. - Unity:
network.nga.sdk-renderfails to resolvenetwork.nga.sdk. Fix: addnetwork.nga.sdkfrom its Git URL too, at the same tag; the render library needs it in your manifest. - Android:
Could not find network.nga:nga-sdk. Cause:mavenCentral()is missing from your repositories, or the BOM line is missing: withoutplatform("network.nga:nga-bom:…")the two libraries have no version. - Android: a version conflict on
network.nga:nga-sdk. Cause: something pulls another version of the core library besidenga-sdk-render, which requires its own. Fix: name one version, through the BOM. - Android:
NoClassDefFoundErrorfor a Kotlin, Install Referrer or App Set class at runtime. Cause: a build rule excluded one of the SDK's dependencies. Fix: remove the exclusion. In Unity, run the External Dependency Manager's Resolve. - Android: a version conflict on
kotlin-stdlib. Cause: your build forces akotlin-stdlibolder than 1.9. Fix: let Gradle resolve the newer one. - iOS: Xcode resolves a version other than 0.1.0, or does not offer a release candidate. Cause: the Dependency Rule is a range, which can pick a newer version and skips a release candidate (
-rc.N, a pre-release). Fix: set the Dependency Rule to Exact Version. - iOS:
No such module 'NGASDK'. Fix: add the product to the target that imports it.
No reward #
onRewardResultwithgrantedfalse. The denial says why; see Rewarded. Tell the player; give nothing.- No
onRewardResultat all. The show ended before its impression counted (onClosedalone, oronShowFailed), so nothing was earned. Or the placement is an interstitial, which never gets one. - The game was killed mid-ad.
onAdClosedAfterRestartis called at the next launch with the result; see Rewarded. - Unity on Android: the reward arrives after the ad closes. Expected; see Pause and resume.
Asking NGA #
First look at your test device's page in the portal (Test devices): its recent ad requests, the reason for each no-fill, and the ad errors it reported. Then write to hi@nga.network with your app key, the platform, the SDK version (NGASDK.getSdkVersion()), the code and detail, and the DEBUG log from launch to the problem.