luckfox0927
luckfox0927

Reputation: 81

NDK for AndroidStudio

I follow this page to study "NDK setting under androidStudio".

http://www.shaneenishry.com/blog/2014/08/17/ndk-with-android-studio/

But I face an issue when I Config ndk with gradle.here is error message. have anybody help me?

Error:(20, 0) Gradle DSL method not found: 'ndk()' Possible causes:

  • The project 'My Application' may be using a version of Gradle that does not contain the method. Open Gradle wrapper file
  • The build file may be missing a Gradle plugin. Apply Gradle plugin
  • Upvotes: 6

    Views: 5133

    Answers (1)

    Someone Somewhere
    Someone Somewhere

    Reputation: 23797

    I had this problem and solved it by following the steps in this blog: http://ph0b.com/new-android-studio-ndk-support/

    and looking at the source code of this project: https://github.com/googlesamples/android-ndk/tree/master/hello-jni

    I hope that helps.

    Upvotes: 1

    Related Questions