Android的工作室:从Eclipse导入NDK项目 [英] Android studio:import NDK project from eclipse
问题描述
我出口在Eclipse(窗口)项目,并将其导入到Android的Studio版本0.4.2(Ubuntu的)。
该项目包括工作NDK库。
我得到这个错误时,尝试运行我的应用程序:
执行失败的任务:应用程序:compileDebugNdk。
NDK未配置
块引用>从别人的帖子计算器,我明白,这是一个问题。
但得不到解决方法这一点。
我应该继续用eclipse开发,现在,还是指一个懒惰的选择吗?编辑:
我运行此命令:
出口NDK =〜/下载/ Android的NDK-R9C
和则:
,然后去我的应用程序目录,然后运行这个:
NDK的构建
和我得到这样的:
yarinkos-U @ yarinkosu-MSI-笔记本-EX600:〜/ AndroidStudioProjects / AndEngineEXperimental $ NDK的构建
/家庭/ yarinkos-U /下载/ Android的NDK-R9C / NDK的构建:1:/家庭/ yarinkos-U /下载/ Android的NDK-R9C / NDK的构建:目录名称:未找到
/家庭/ yarinkos-U /下载/ Android的NDK-R9C / NDK的构建:132:/家庭/ yarinkos-U /下载/ Android的NDK-R9C / NDK的构建:UNAME:未找到
错误:未知的主机操作系统:我做错了什么?
看来,脚本运行,但我想念的东西在那里。编辑2:
我误乳宁这也:
出口PATH =〜/下载/ Android的NDK-R9C
所以我得到上述错误。
如果我onlt运行以下命令:出口NDK =〜/下载/ Android的NDK-R9C
我得到NDK的构建没有发现错误。
解决方案NDK支持从Android电子工作室0.4.1只介绍了,所以请确保您运行的AS 0.4.1或以上。
Android的插件的gradle必须 0.7 + 中的build.gradle文件,也是新NDK集成需要的 NDK R9C
0.4.1版本受到来自开发人员工具博客行
支持导入NDK项目。如果导入的项目包含NDK
消息人士透露,这些被导入到JNI /信源设置的项目,
模块名称从Makefile中推断出来,并存储在摇篮
文件,并在ndk.dir属性在local.properties定义
块引用>检查更多关于它在这里:
http://tools.android.com/recent
I exported project from Eclipse(windows) and imported it to android studio V 0.4.2(ubuntu).
The project include working NDK library.I get this error when try to run my app:
Execution failed for task ':app:compileDebugNdk'.
NDK not configured
From others stackoverflow posts, I understand that it is an issue.
But get no workaround for this.
Should i proceed the development with eclipse for now, or is that the a lazy option ?EDIT : I run this command:
export NDK=~/Downloads/android-ndk-r9c
and then :
and then go to my app directory and run this:
ndk-build
And i get this:
yarinkos-u@yarinkosu-MSI-Notebook-EX600:~/AndroidStudioProjects/AndEngineEXperimental$ ndk-build /home/yarinkos-u/Downloads/android-ndk-r9c/ndk-build: 1: /home/yarinkos-u/Downloads/android-ndk-r9c/ndk-build: dirname: not found /home/yarinkos-u/Downloads/android-ndk-r9c/ndk-build: 132: /home/yarinkos-u/Downloads/android-ndk-r9c/ndk-build: uname: not found ERROR: Unknown host operating system:
What i did wrong?
It seems that the script running,but i miss something there.EDIT 2:
i mistakenly runing this also :
export PATH=~/Downloads/android-ndk-r9c
so i get the error above.
If i running onlt this :export NDK=~/Downloads/android-ndk-r9c
I get ndk-build not found error.
解决方案NDK Support is introduced from Android Studio 0.4.1 only, so make sure you are running AS 0.4.1 or above.
Android gradle plugin must be 0.7.+ in build.gradle file and also new NDK integration requires NDK r9c .
Lines from Developer tools blog under Release 0.4.1
Supports importing NDK projects. If the imported project contains NDK sources, these are imported into the jni/ source set of the project, the module name is inferred from the Makefile and stored in the Gradle file, and the ndk.dir property is defined in local.properties.
Check more about it here :
http://tools.android.com/recent
这篇关于Android的工作室:从Eclipse导入NDK项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!