# FAQ & Troubleshooting

<details>

<summary>The runtime crash using Android Gradle Plugin 7.2.0</summary>

The apps using this AGP version will face this error at runtime:

```
2022-06-14 11:30:19.954 21270-21290/tv.fw.example.discovery E/AndroidRuntime: FATAL EXCEPTION: pool-3-thread-1
    Process: tv.fw.example.discovery, PID: 21270
    java.lang.IllegalArgumentException: tv.fw.example.discovery: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
    Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
        at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
        at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
        at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
        at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:174)
        at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:108)
        at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:86)
        at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:75)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:920)

```

Currently based on [this StackOverflow thread](https://stackoverflow.com/a/69152986/2359762) the best solution is adding the latest work manager dependency to your app:

```
    // Required to avoid crash on Android 12 API 31
    // https://stackoverflow.com/a/69152986/2359762
    implementation("androidx.work:work-runtime-ktx:2.7.1")
```

Update to the latest version and the problem will be solved

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.firework.com/firework-for-developers/android-sdk/faq-and-troubleshooting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
