适用于 AndroidStudio 的 NDK [英] NDK for AndroidStudio

查看:23
本文介绍了适用于 AndroidStudio 的 NDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我跟着这个页面学习androidStudio下的NDK设置".

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

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

但是当我使用 gradle.here 配置 ndk 时,我遇到了一个问题.有人帮我吗?

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

错误:(20, 0) Gradle DSL 方法未找到:'ndk()'可能的原因:

  • 项目我的应用程序"可能正在使用不包含该方法的 Gradle 版本.打开 Gradle 包装器文件
  • 构建文件可能缺少 Gradle 插件.应用 Gradle 插件
  • 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
  • 推荐答案

    我遇到了这个问题,并按照本博客中的步骤解决了这个问题:http://ph0b.com/new-android-studio-ndk-support/

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

    并查看该项目的源代码:https://github.com/googlesamples/android-ndk/tree/master/hello-jni

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

    希望能帮到你.

    这篇关于适用于 AndroidStudio 的 NDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆