使用eclipse mac找不到ndk-build和命令 [英] ndk-build and command not found using eclipse mac

查看:292
本文介绍了使用eclipse mac找不到ndk-build和命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用eclipse for android-ndk在mac开发和Android应用程序。我已经在日食中给了NDK路径。最后,当我给这个命令使用android-ndk构建我的应用程序,但得到以下错误:



命令:ndk-build

  ndk-build-bash:ndk-build:command not found 

请帮助我在这里





我的终端命令:

  Muhammads-MacBook-Pro:〜UsmanKhan $ cd下载
Muhammads-MacBook-Pro:下载UsmanKhan $ cd 26thMarch2014
Muhammads-MacBook-Pro :26thMarch2014 UsmanKhan $ cd a2zLatest
Muhammads-MacBook-Pro:a2zLatest UsmanKhan $ ls
AndroidManifest.xml gen proguard-project.txt
Thumbs.db ic_launcher-web.png project.properties
assets libs res
bin lint.xml src
Muhammads-MacBook-Pro:a2zLatest UsmanKhan $ ls bin / classes /
com
Muhammads-MacBook-Pro:a2zLatest UsmanKhan $ ls bin / classes / com / testing / ndk
BuildConfig.class R $ dimen.class R $ string.class
FibLib.class R $ drawable.class R $ style.class
MainActivity.class R $ id.class R.class
R $ attr.class R $ layout.class
R $ color.class R $ menu.class
Muhammads-MacBook-Pro:a2zLatest UsmanKhan $ mkdir jni
Muhammads-MacBook-Pro:a2zLatest UsmanKhan $ javah -jni -classpath bin / classes / -d jni / com.testing.ndk.FibLib
Muhammads-MacBook-Pro:a2zLatest UsmanKhan $ ls jni
com_testing_ndk_FibLib.h
Muhammads-MacBook-Pro:a2zLatest UsmanKhan $ ls jni
Muhammads-MacBook-Pro:a2zLatest UsmanKhan $ javah -jni -classpath bin / classes / -d jni / com.testing.ndk.FibLib
Muhammads-MacBook-Pro:a2zLatest UsmanKhan $ javah -jni -classpath bin / classes / -d jni / com.testing.ndk.FibLib
Muhammads-MacBook-Pro: a2zLatest UsmanKhan $ ndk-build
-bash:ndk:command not found

最后我正在获得ndk-build错误。

解决方案

而不是 ndk-build 命令,只需键入〜/ Desktop / AndroidNDK / android-ndk-r10d / ndk-build 在您的终端。


I am developing and android application in mac using eclipse for android-ndk. I have already given NDK path in eclipse. At the end when i am giving this command to build my application using android-ndk but getting the following errors:

command: ndk-build

ndk-build-bash: ndk-build: command not found

Please help me out here

My Terminal Commands:

Muhammads-MacBook-Pro:~ UsmanKhan$ cd downloads
Muhammads-MacBook-Pro:downloads UsmanKhan$ cd 26thMarch2014
Muhammads-MacBook-Pro:26thMarch2014 UsmanKhan$ cd a2zLatest
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ ls
AndroidManifest.xml gen         proguard-project.txt
Thumbs.db       ic_launcher-web.png project.properties
assets          libs            res
bin         lint.xml        src
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ ls bin/classes/
com
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ ls bin/classes/com/testing/ndk
BuildConfig.class   R$dimen.class       R$string.class
FibLib.class        R$drawable.class    R$style.class
MainActivity.class  R$id.class      R.class
R$attr.class        R$layout.class
R$color.class       R$menu.class
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ mkdir jni
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ javah -jni -classpath bin /classes/ -d jni/ com.testing.ndk.FibLib
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ ls jni
com_testing_ndk_FibLib.h
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ ls jni
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ javah -jni -classpath bin/classes/ -d jni/ com.testing.ndk.FibLib
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ javah -jni -classpath bin/classes/ -d jni/ com.testing.ndk.FibLib
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ ndk-build
-bash: ndk: command not found

At the end i am getting ndk-build error.

解决方案

Instead of ndk-build command, simply type ~/Desktop/AndroidNDK/android-ndk-r10d/ndk-build in your terminal.

这篇关于使用eclipse mac找不到ndk-build和命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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