> For the complete documentation index, see [llms.txt](https://docs.sfbx.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sfbx.io/configuration/step-3-notice-implementation-web-app-tv/android/old-sdk-appconsentsdk/faq.md).

# FAQ

***

## Android Context has not been loaded

```
********************************************************************************************************
* The Android context has not been loaded by the [androidx.startup.Initializer] plugin.                *
* If you encounter this error, please let us know through support so that we can improve the product.  *
* To resolve this error, call the [AppConsentSDK.loadContext] method.                                  *
********************************************************************************************************
```

If this error appears in your logs, follow the instruction recommended by the message by calling the following method :

`AppConsentSDK.loadContext`

Once you've done this, call the `AppConsentSDK.initialize` method again, as you did initially.

## RuntimeException caused by WebView

```
Caused by: java.lang.RuntimeException:
Using WebView from more than one process at once with the same data directory is not supported.
https://crbug.com/558377 : Current process xx.xxx.xxxx (pid aaaaa), lock owner\"yy.yyy.yyyy (pid bbbbb)
```

First of all, look for the cause. It may be that this happens when you integrate our SDK (we use the WebView component), but the problem arises because the component is used by different memory areas (thread, process).

Multiple instances cannot access the same files / folders stored on the device from different Threads (concurrency).

The SDK manages this problem, but it may not be able to correct it if, for example, a third-party library uses the WebView component before the SDK has even initialized.

In which case, you'll have to manage this part yourself by defining a new directory for your WebView (<https://crbug.com/558377>) using this method:

`WebView.setDataDirectorySuffix(String)`

## Duplicate classes

When compiling your project, you encounter an error from the kotlin.stdlib library explaining that you have a duplicate class ?

```
Caused by: java.lang.RuntimeException: Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-1.8.20-dev-78 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20-dev-78) and kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
```

Add this configuration block to your app module build.gradle:

```
dependencies {
    ...
    modules {
        module("org.jetbrains.kotlin:kotlin-stdlib-jdk7") {
            replacedBy("org.jetbrains.kotlin:kotlin-stdlib", "kotlin-stdlib-jdk7 is now part of kotlin-stdlib")
        }
        module("org.jetbrains.kotlin:kotlin-stdlib-jdk8") {
            replacedBy("org.jetbrains.kotlin:kotlin-stdlib", "kotlin-stdlib-jdk8 is now part of kotlin-stdlib")
        }
    }
    ...
}
```

## Decompilation error

If you are using a version of gradle prior to version 8, you may encounter the following error when integrating CMP (since version 4.X.X):

`Error: com.android.tools.r8.internal.nc: Sealed classes are not supported as program classes`

This is a "normal" error, as Gradle 7 is unable to decompile certain classes (Gradle 8 requires you to migrate to JAVA 17).

The only solution is to add the R8 plugin to your project.

The reference for this patch comes from a [Google Issue](https://issuetracker.google.com/issues/290412574) and the solution is as follows:

```
pluginManagement {
    buildscript {
        repositories {
            mavenCentral()
            maven {
                url = uri("https://storage.googleapis.com/r8-releases/raw")
            }
        }
        dependencies {
            classpath("com.android.tools:r8:8.2.20-dev")

        }
    }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.sfbx.io/configuration/step-3-notice-implementation-web-app-tv/android/old-sdk-appconsentsdk/faq.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
