Android Studio 0.4: Could not find method jniDir()

前端 未结 1 939
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-05 12:41

When updating to Android Studio 0.4, which uses the android gradle plugin 0.7.0 and gradle 1.9, following error occurs:

org.gradle.api.internal.MissingMet

1条回答
  •  星月不相逢
    2021-02-05 13:00

    jniDir() has been replaced by jniFolders(). You can set it like this:

    tasks.withType(com.android.build.gradle.tasks.PackageApplication) { pkgTask ->
        pkgTask.jniFolders = new HashSet()
        pkgTask.jniFolders.add(new File(projectDir, 'native-libs'))
    }
    

    I found this solution in this discussion

    0 讨论(0)
提交回复
热议问题