Unable to set abiFilter using kotlin dsl

Viewed 802

After updating android gradle plugin from 4.0.3 to 4.1.0, I am not able to set abiFilter in kotlin DSL.

Getting following error.

Val cannot be reassigned

3 Answers

able to add by doing as following

abiFilters.add("armeabi")
abiFilters.add("mips")

Use like this

defaultConfig {
     ndk {
          abiFilters.add("armeabi-v7a")
          abiFilters.add("arm64-v8a")
         }
}

Guess this will be more idiomatic than other current answers,

    ndk {
        abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
    }
Related