Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
  • like image 405
    luckfox0927 Avatar asked Apr 01 '15 07:04

    luckfox0927


    1 Answers

    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.

    like image 168
    Someone Somewhere Avatar answered Sep 30 '22 23:09

    Someone Somewhere