> ## Documentation Index
> Fetch the complete documentation index at: https://www.cashfree.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK Troubleshooting

> Common integration errors and solutions for SDKs

### Mobile SDKs

<Accordion title="Integration errors due to outdated SDK versions." onClick={() => posthog.capture('Accordion Clicked', { title: "Integration errors due to outdated SDK versions." })}>
  To troubleshoot this issue, follow this step:

  * Always use the latest SDK versions. Check the [Changelog](https://www.cashfree.com/docs/payments/developers/changelog/android) for updates.
</Accordion>

<Accordion title="NOT_AVAILABLE isn’t a trusted source,  app should be installed from play store or another whitelisted app" onClick={() => posthog.capture('Accordion Clicked', { title: 'Error: "NOT_AVAILABLE isn\'t a trusted source,  app should be installed from play store or another whitelisted app"' })}>
  When the user is trying to install apps from sources other than the Play Store / App Store and test them in a Production environment then Cashfree mobile SDK Android, React Native, Flutter, Cordova, Ionic, Capacitor will block the transaction.

  To troubleshoot this issue, follow these steps:
  The guidelines provided here to test app in [production environments](https://www.cashfree.com/docs/payments/online/mobile/misc/cashfree_integrity_prod_testing).
</Accordion>

<Accordion title="NDK version mismatch error with flutter_cashfree_pg_sdk" onClick={() => posthog.capture('Accordion Clicked', { title: "NDK version mismatch error with flutter_cashfree_pg_sdk" })}>
  This issue occurs when there is an NDK version mismatch between your local setup and the SDK requirements.\
  To troubleshoot this issue, follow these steps:

  * Update the ndk.dir path in your local.properties file:\
    `ndk.dir=/path/to/ndk/<required_version>`
  * Alternatively, open Android Studio > SDK Manager > SDK Tools, and install the required NDK version.
</Accordion>

<Accordion title="Gradle build error: Could not resolve com.cashfree.pg:api..." onClick={() => posthog.capture('Accordion Clicked', { title: "Gradle build error: Could not resolve com.cashfree.pg:api..." })}>
  This issue occurs when Gradle cannot find the required Cashfree dependencies.\
  To troubleshoot this issue, follow these steps:

  * Add the following repositories inside android/build.gradle under allprojects > repositories:\
    `google()`\
    `mavenCentral()`\
    `maven { url "https://jitpack.io" }`
</Accordion>

<Accordion title="How to initialise payment using cashfree_pg_sdk" onClick={() => posthog.capture('Accordion Clicked', { title: "How to initialise payment using cashfree_pg_sdk" })}>
  To initialise a payment, follow these steps:

  * Use the method:\
    `CashfreePGSDK.doPayment(orderId, setEnvironment, setPaymentSessionId);`
  * Ensure the following:
    * `orderId` and `paymentSessionId` are securely generated from your backend.
    * `setEnvironment` is either `SANDBOX` or `PRODUCTION`.
    * You specify the platform (for example, UPI, card, or netbanking).
</Accordion>

<Accordion title="Why don’t UPI apps launch in test mode?" onClick={() => posthog.capture('Accordion Clicked', { title: "Why don’t UPI apps launch in test mode?" })}>
  This issue occurs in the sandbox (test) environment. Real UPI apps don’t launch because transactions are simulated.\
  To test UPI behaviour, follow these steps:

  * Use the Cashfree UPI simulator with sandbox credentials.
  * For end-to-end testing, use production mode with small payment amounts.
</Accordion>

<Accordion title="SDK shows strange or inconsistent errors" onClick={() => posthog.capture('Accordion Clicked', { title: "SDK shows strange or inconsistent errors" })}>
  To troubleshoot this issue, follow these steps:

  * Run:\
    `flutter clean`\
    `flutter pub get`
  * If issues persist, delete the following directories:\
    `.gradle/`\
    `.idea/`
</Accordion>

### Server-Side SDKs

<Accordion title="Sample integration kits" onClick={() => posthog.capture('Accordion Clicked', { title: "Access the sample integration kits from the below list" })}>
  Sample integration kits

  * [Python](https://github.com/cashfree/cashfree-pg-sdk-python)
  * [Java](https://github.com/cashfree/cashfree-pg-sdk-java)
  * [.NET](https://github.com/cashfree/cashfree-pg-sdk-dotnet)
  * [PHP](https://github.com/cashfree/cashfree-pg-sdk-php)
  * [Node.js](https://github.com/cashfree/cashfree-pg-sdk-nodejs)
  * [Go](https://github.com/cashfree/cashfree-pg)
</Accordion>
