Question

I'm working on an Android project, using the Eclipse ADT environment provided by Google. This project has a somewhat complex Android.mk file, that can be easily misconfigured. In order to ensure correct build flow and output warning and diagnostic messages to the console output, I rely on the $warning() command.

The $warning() commands are working fine, with the expected output being shown in the Build console; however, the Eclipse IDE is flagging the lines where I invoke the $warning() commands as having errors. These errors are propagating hierarchically to the Project Explorer Navigation window, where the Android.mk and the jni folder are also shown as having errors.

Here is an example of a command that triggers an error:

$(warning value of BUILD_CONFIG IS '$(BUILD_CONFIG)')

Although everything is working as expected, I'm being a little pedantic and would like to remove these false errors from the IDE. Is this possible?

Was it helpful?

Solution

You can use $(info) instead of $(warning). Note that even these innocent messages will ruin the native debugging setup ndk-gdb; I use them only conditionally, e.g.

ifeq ($V,1)
  $(info value of BUILD_CONFIG IS '$(BUILD_CONFIG)')
endif
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top