Docs index: /llms.txt · every page as Markdown: add .md

‹ Platforms

Android troubleshooting

Fix Android SDK errors from Gradle, the secret and the device.

SymptomCauseFix
Expression2Exception from create() naming the API secretno secret setcall Expression2Credential.set(secret) before fetch() and create()
Essence2MeteringRefused (ai.bithuman.elevate.MeteringRefused in stack traces) on the first Essence 2 pull()no secret setcall Essence2Credential.set(secret) before fetch() and create()
A refusal reading refusing to serve: API and SDK access starts at the Creator planthe account’s plan does not include SDK access; from 2026-10-12 this includes Free accountschoose a plan
A refusal reading this account is already running as many sessions as its plan allowsevery concurrent session of the plan is in useclose() the avatars you no longer show, or upgrade the plan
A refusal reading this account is suspendedthe account is suspendedcontact support at hello@bithuman.ai
A refusal reading this account has no credits remaining (402) (Essence 2: Essence2MeteringRefused; Expression 2: Expression2Exception)the account is out of creditstop up; the next meter report is accepted
Essence2StoreException from fetch() with code OFFLINE or NETWORK_TRANSIENTno network, or bitHuman’s server did not answer in timecall fetch() again later (retriable is true); the download keeps its bytes. It says nothing about the secret: do not sign the user out
Essence2StoreException from fetch() with code == OUTDATEDthe avatar was published again while it downloaded: the server now describes other filescall fetch() again (retriable is true); it follows the current files. Decide on code and retriable, never on the message
published before the renderer in this SDK from Essence2Bundle.open(), or an IllegalStateException from Essence 2 create() naming the agent codethe avatar’s files on the phone are older than the engine accepts, for example a folder staged by handstore.fetch(code, force = true), then open and create again
Essence2StoreException from fetch()no secret was set when the store downloadedcall Essence2Credential.set(secret) before fetch()
Expression 2 renders slowly; acceleratorNote says no libQnnTFLiteDelegate.sothe accelerator runtime was excluded, or legacy packaging is offkeep the dependency whole and set useLegacyPackaging = true
The first Expression 2 create() after install is slowthe accelerator prepares the decoder once and keeps it; later launches reuse itcreate on a background thread at app start; only the first launch after install pays it (and again after an SDK or OS update)
Download refused with 401the avatar is privateset its owner’s API secret with Expression2Credential.set or Essence2Credential.set
409 MODEL_NOT_GENERATED on downloadthe agent has no model of that kind yetadd the model, then retry
Could not find ai.bithuman:expression2-android:… (or essence2-android)bitHuman’s Maven repository is not in the build’s repositoriesadd the exclusiveContent block for https://maven.bithuman.ai to settings.gradle.kts, as in Install
Manifest merge fails on minSdkessence2-android needs minSdk 29raise the module to 29
Unresolved reference: BuildConfigthe Android Gradle Plugin turns BuildConfig off by defaultadd buildFeatures { buildConfig = true }
Unresolved reference 'MeteredDoorResolver'the resolver’s public name is Essence2MeteredDoorResolveryou rarely need it: Essence2Credential.set(secret) covers downloads. To pass a secret explicitly: import ai.bithuman.essence2.Essence2MeteredDoorResolver, then Essence2ModelStore(context, urlResolver = Essence2MeteredDoorResolver(secret))
Gradle stops with What went wrong: followed only by a Java version number (such as 25.0.4.1)Gradle 8.11 cannot run on that JDKset JAVA_HOME to JDK 17 or 21 and build again
The session is refused although you set a secretBuildConfig.BITHUMAN_API_SECRET is emptyset bithuman.apiSecret in local.properties or BITHUMAN_API_SECRET, then rebuild
UnsatisfiedLinkError on an emulatorthe engines are arm64-v8a onlyrun on a physical arm64 handset