Android ndk: utils/Log.h: 没有这样的文件或目录编译终止
Android ndk: utils/Log.h: No such file or directory compilation terminated
正在编译Android NDK项目,但无法成功完成。它说在 main.cpp 文件中找不到这样的文件或目录的日志头文件。我是安卓NDK的新手,请帮忙。这是我 android.mk 文件。
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := user
LOCAL_ARM_MODE := arm
# This is the target being built.
LOCAL_MODULE := libemu
# All of the source files that we will compile.
LOCAL_SRC_FILES :=
ticks.c
main.cpp
emulator.cpp
# All of the shared libraries we link against.
LOCAL_SHARED_LIBRARIES :=
libdl
libnativehelper
libutils
# Static libraries.
LOCAL_STATIC_LIBRARIES :=
# Also need the JNI headers.
LOCAL_C_INCLUDES +=
$(JNI_H_INCLUDE)
# Special compiler flags.
LOCAL_CFLAGS += -O3 -fvisibility=hidden
# Don't prelink this library. For more efficient code, you may want
# to add this library to the prelink map and set this to true. However,
# it's difficult to do this for applications that are not supplied as
# part of a system image.
LOCAL_PRELINK_MODULE := false
include $(BUILD_SHARED_LIBRARY)
这是日志
"Compile++ arm : emu <= main.cpp
D:/EclipseWorkspace/NineTendo//jni/main.cpp:2:23: fatal error: utils/Log.h: No such file or directory
compilation terminated.
make: *** [D:/EclipseWorkspace/NineTendo//obj/local/armeabi/objs/emu/main.o] Error 1
任何帮助将不胜感激。谢谢
此错误
开始出现在NDK版本R9x中。您需要在 Application.mk 文件中声明 API 版本号。以下是定义最低 API 级别 8 的外观:
APP_PLATFORM := android-8
Application.mk 文件应与 JNI 目录中的 Android.mk 文件一起存在。这是我的一个项目的示例:
APP_ABI := armeabi armeabi-v7a x86
APP_CFLAGS += -O2
LOCAL_ARM_MODE := arm
APP_PLATFORM := android-8
相关文章:
- 多个文件的内存分配错误"在抛出 'std :: bad_alloc' what (): std :: bad_alloc 的实例后终止调用" [C++]
- 这是我的 .h 文件的一些错误,当我在其中包含我的类模板时,它显示 [错误] 未终止 #ifndef
- 编译Qt项目,得到错误QQmlEngine:没有这样的文件或目录编译终止
- 如何提前终止在另一个文件中定义的函数?
- 致命错误:opencv2/core.hpp:opencv4 中没有此类文件或目录编译终止
- C++Ubuntu在终止时未释放锁定文件上的锁定
- C++ 中的文件 IO 出错。在抛出 'std::length_error' 的实例后调用的终止 what(): basic_string::调整大小
- Android ndk: utils/Log.h: 没有这样的文件或目录编译终止
- 用信号25终止程序,超过文件尺寸限制;为什么
- Win32 查找第一个文件非终止通配符扩展
- Shell脚本终止程序,但导致无法写入输出文件
- 为什么我的程序终止调用KERNEL32!文件时间到系统时间 ()
- 致命错误:opencv/cvtypes.h:没有终止此类文件或目录编译
- 从文件中读取时程序不会终止
- iconv.h:没有终止这样的文件或目录编译
- Openfstexample.cpp:1:24:致命错误:fst/fstlib.h:没有终止这样的文件或目录编译
- Qt 5.5.0 在 Windows 上使用 mingw:编译的可执行文件无法终止
- 如果WinRT应用程序在文件复制过程中终止,会发生什么
- Winsock UDP文件终止错误10040
- 致命错误:字符串:没有这样的文件或目录编译终止