Skip to content

Android:CompileError

Format not a string literal and no format arguments

android-ndk-r9 NDK빌드중 아래와 같은 에러가 발생할 수 있다.

format not a string literal and no format arguments [-Werror=format-security]

jni디렉터리의 Application.mk파일에 아래의 내용을 추가하면 에러 없이 컴파일이 진행된다.

APP_CFLAGS += -Wno-error=format-security

혹은 APP_CPPFLAGS에 추가해도 된다.