Sravan
Sravan

Reputation: 441

Unable to set abiFilter using kotlin dsl

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

Upvotes: 12

Views: 7717

Answers (4)

dazhao
dazhao

Reputation: 83

You can add abi list like this

defaultConfig {
    ndk {
    abiFilters.addAll(arrayOf("armeabi-v7a", "arm64-v8a", "x86_64"))
    }
}

Upvotes: 2

Ebrahim Byagowi
Ebrahim Byagowi

Reputation: 11228

Guess this will be more idiomatic than other current answers,

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

Upvotes: 16

Rohan Pawar
Rohan Pawar

Reputation: 2003

Use like this

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

Upvotes: 6

Sravan
Sravan

Reputation: 441

able to add by doing as following

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

Upvotes: 9

Related Questions