2015-05-01 33 views
1

我想使用Android系统的NDK廓 - https://github.com/richq/android-ndk-profilerNDK无法找到我的NDK_MODULE_PATH模块 - Android的NDK廓

当使用文档中描述https://github.com/richq/android-ndk-profiler/blob/master/docs/Usage.md

我解压缩zip文件至$ HOME /文档/开发

我Android.mk看起来像这样

LOCAL_PATH := $(call my-dir) 

include $(CLEAR_VARS) 

LOCAL_MODULE := ndkbasics 
LOCAL_SRC_FILES := ndkbasics.cpp 
LOCAL_LDLIBS := -llog 

# compile with profiling 
LOCAL_CFLAGS := -pg 
LOCAL_STATIC_LIBRARIES := android-ndk-profiler 

include $(BUILD_SHARED_LIBRARY) 

# at the end of Android.mk 
$(call import-module,android-ndk-profiler) 

当尝试使用下面的命令来构建

ndk-build NDK_MODULE_PATH=$HOME/Documents/Dev/ 

我得到的错误

Android NDK: /Users/hanantha/Documents/Dev/projects/workspaceWeeklyPreso/NdkProfileMethods/jni/Android.mk: Cannot find module with tag 'android-ndk-profiler' in import path  
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?  
Android NDK: The following directories were searched:  
Android NDK:   
/Users/hanantha/Documents/Dev/projects/workspaceWeeklyPreso/NdkProfileMethods/jni/Android.mk:16: *** Android NDK: Aborting. . Stop. 

其他景点

  • 我试图在我的.bash_profile
  • NDK版本r10d
  • 然make文件解压后设置NDK_MODULE_PATH文件夹android-ndk-profiler

很奇怪,ndk说它搜索的目录是空的。可能会出现什么问题?

+0

你解决了这个问题吗? –

+0

不,我没有,我最终编译了android-ndk-profiler源代码以及我的应用程序,我正在分析它。 – Harkish

回答

0

我认为你做了正确的差不多过程中需要在一个地方改变如下

# at the end of Android.mk 
$(call import-module,android-ndk-profiler/jni) 

进口模块添加jni,因为它的工作对我来说将解决你的问题。