Saeed
Saeed

Reputation: 439

WebRTC need min sdk 24

I updated webrtc to revision 21320, but i have following problem and can't build app

Error:com.android.builder.dexing.DexArchiveBuilderException: com.android.tools.r8.errors.CompilationError: Static interface methods are only supported starting with Android N (--min-api 24): org.webrtc.EglBase org.webrtc.EglBase.create()

how can i fixed it?

Upvotes: 2

Views: 3772

Answers (3)

Jay Son
Jay Son

Reputation: 71

Add this to your gradle.properties

android.enableDexingArtifactTransform.desugaring=false

Upvotes: 0

firemaples
firemaples

Reputation: 1541

Static interface methods is new feature in JAVA 8

You can set JAVA version to 1.8 instead of change the min SDK version

Add following codes to your build.gradle:

android {
    compileOptions {
        targetCompatibility 1.8
        sourceCompatibility 1.8
    }
}

Upvotes: 6

Alex Cohn
Alex Cohn

Reputation: 57203

Pick https://webrtc.googlesource.com/src/+/0af8370cb38b0b0f35f4ed4ec4237d0e6c7d59da or better to https://webrtc.googlesource.com/src/+/086ede313bb68a7f64eff19d51b2c7f1b9623372 (a.k.a. branch-heads/64). I find the Chromium branches a bit safer to use.

File a complaint at https://bugs.chromium.org/p/webrtc/issues/entry.

Manually revert commit b9f3f9bdd7f2faba90b4f30d0c4b592c2ede8de3.

Or, set your minSdk to 24 and enjoy Java 8!

Upvotes: 0

Related Questions