http://www.xuebuyuan.com/1947880.html
- 在进行Android NDK的开发当中有时想看看Android.mk文件当中某个变量的值,可以再Android.mk文件当中用warnin语句实现该功能假如有个Android.mk文件的内容如下:
- LOCAL_PATH := $(call my-dir)
- include $(CLEAR_VARS)
- LOCAL_MODULE := hello-jni
- LOCAL_SRC_FILES := hello-jni.c
- include $(BUILD_SHARED_LIBRARY)
我们想看看 LOCAL_PATH 的具体的值是多少于是我们就可以用下面的方式输出
- LOCAL_PATH := $(call my-dir)
- $(warning "the value of LOCAL_PATH is$(LOCAL_PATH)")
- include $(CLEAR_VARS)
- LOCAL_MODULE := hello-jni
- LOCAL_SRC_FILES := hello-jni.c
- include $(BUILD_SHARED_LIBRARY)
最后在运行结果为:
- 在进行Android NDK的开发当中有时想看看Android.mk文件当中某个变量的值,可以再Android.mk文件当中用warnin语句实现该功能假如有个Android.mk文件的内容如下:
- LOCAL_PATH := $(call my-dir)
- include $(CLEAR_VARS)
- LOCAL_MODULE := hello-jni
- LOCAL_SRC_FILES := hello-jni.c
- include $(BUILD_SHARED_LIBRARY)
我们想看看 LOCAL_PATH 的具体的值是多少于是我们就可以用下面的方式输出
- LOCAL_PATH := $(call my-dir)
- $(warning "the value of LOCAL_PATH is$(LOCAL_PATH)")
- include $(CLEAR_VARS)
- LOCAL_MODULE := hello-jni
- LOCAL_SRC_FILES := hello-jni.c
- include $(BUILD_SHARED_LIBRARY)
最后在运行结果为: