Troubleshooting
The problems developers hit first, each with its fix.
The secret key is declared on the JVM alone, so an Android or iOS build cannot name it. Keep it on your server, and build the app's client with Credential.Publishable and a session token your server mints. See authentication in the SDK.
On a JVM server, import the factory that builds it:
The admin operations come with mountaya-admin and one import. Add the module to the server's build, then:
MapView and every composable of mountaya-elements are Android only. Call them from androidMain, or from an Android app module. On iOS and the JVM, MapEngine holds the map's state for views of your own.
The key is empty, has the wrong prefix, or holds a character no HTTP header carries, such as the … of a placeholder. Check that BuildConfig.MOUNTAYA_PUBLISHABLE_KEY holds the key your .env names, and rebuild after changing the file.
The Data API answers a publishable key only beside a live session token, and a token given as a value expires within minutes. Give the client a SessionTokenEngine whose mint asks your server, as keep the token fresh shows.
The API refused the map's own requests: the key lacks the tiles scope, or the agreement does not cover the Tile API. Watch map.state.value.isAccessRequired, or collect map.events() and log each MapEvent.AccessRefused with its status and address. See hear what the map refuses.
The token was minted for another use, or is minted without user_id. Mint it on your server with user_id set and surface = RestSchema.SessionSurface.StudioEmbedded, under a key carrying the studio-embedded scope. See act as a member.
Your organization's agreement does not cover the call, or a payment is due. Code cannot fix it: show the BillingException's message, which names the fact and where it is resolved, and never retry.
constructWebhookEvent needs the body exactly as it arrived. Read it as bytes before any JSON parser touches it, and pass the endpoint's own secret, whsk_ included. See verify a delivery.
DeviceLocationSource reads only under the full location permission. Declare ACCESS_FINE_LOCATION beside ACCESS_COARSE_LOCATION, ask for it in your own flow, then call recheckPermission() from the result.
The device's speech engine did not start, or your sentence function answered null for that instruction. Call voice.prepare() up front, and hand the voice an onError: it hears SpeechException.Kind.EngineUnavailable where the device has no usable engine.
The modules need compileSdk 37 or higher and minSdk 24 or higher, Kotlin 2.4 and Java 17. Raise the app's build to those floors. See requirements.