Error while compiling the build

Product: Android SDK

Product Version: 9.0.1

Please give a brief summary of your issue:
Unable to build the application after integrating sdk.

Please describe your issue and provide steps to reproduce it:

Getting below error while compiling the build.

Default interface methods are only supported starting with Android N (–min-api 24): void com.pdftron.pdf.utils.AnnotUtils$AnnotVisitor.visit(java.lang.Object)

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi,

Your project may be missing some compileOptions, could you add the following to your project and let us know if this resolves the issue?

android {
...
  compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
...
}

Best Regards,
Eamon

Hi,
Still i’m seeing the same error even after adding

Hi,

Sorry I missed some code in the example, please try the below code:

android {
    ...
    // Configure only for each module that uses Java 8
    // language features (either in its source code or
    // through dependencies).
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
    // For Kotlin projects
    kotlinOptions {
        jvmTarget = "1.8"
    }
}

If this does not resolve the issue could you send us a sample project to test on our end?

Best Regards,
Eamon