[英]Issue with build Android NDK project
我嘗試在Linux Ubuntu上用Eclipse構建項目。 Eclipse顯示錯誤消息:
**** Build of configuration Default for project FFVideo ****
/home/art/android-ndk-r7b/ndk-build V=1
Cannot run program "/home/art/android-ndk-r7b/ndk-build": Unknown reason
Error: Program "/home/art/android-ndk-r7b/ndk-build" is not found in PATH
PATH=[/home/art/android-ndk-r7b:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games]
**** Build Finished ****
為什么會這樣?
你需要在eclipse中設置android ndk的路徑。
1.打開C / C ++ Perspective。
2.右鍵單擊項目,然后選擇“屬性”
3.選擇C / C ++ Build => Environment
4.添加PATH環境變量,包含android ndk的路徑。
這對我有用,但我必須在終端執行此命令,因為問題在於權限。
sudo chmod 777 -R android-ndk-r8c /
是的,這對我也有用......
這似乎告訴我,Ecipse IDE在.bashrc之前使用PATH? 我的意思是:我有PATH =“$ PATH:/ opt / android-sdk-linux / tools /:/ opt / android-sdk-linux / platform-tools:/ opt / android-ndk-r8c in。 bashrc,但Eclipse IDE使用PATH而沒有android-sdk / android-ndk設置。
對我來說有點奇怪....
我通過在ubuntu終端以及eclipse中添加NDK路徑到路徑變量來找到解決方案。 然后我不得不在“ndk-build.cmd”中刪除“.cmd”,因為終端說我沒有權限使用此文件結束。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.