Bjorn, your observation is correct. There are 3 ways to resolve the problem and let Eclipse (sorry, ADT) to build the project.
- disable the CDT GNU C/C++ error parser (in the second tab in Project properties/C Build/Settings).
- use ndk-build APP_MIN_PLATFORM_LEVEL=99 <any other parameters as usual>
- edit file $NDK/build/core/add_application.mk: in line 128 change __ndk_warning to __ndk_info
IMHO, the first approach is bad because it breaks "jump to error" in Eclipse. The third approach is good except you modify an NDK file. The second approach has its drawback, too: the warning will not appear at all.
The warning is important, because if you use higher platform features in your native code, the app may crash. I disagree with Digit, though: there are many ways to conditionally execute the code that relies on a higher platform, and the checks may be performed not only in Java, but in native code, too.
BR,
Alex
On Friday, January 11, 2013 11:23:55 PM UTC+2, Bjorn Gott wrote:
When I attempt to compile my test project with native code, I get the same message but as an error, not just a warning. It will not allow me to compile my project for Gingerbread and later. I am using the ADT 21.0.1 plugin on a Mac with the latest version of eclipse and ndk-r8d. By cutting out gingerbread, it is cutting out about half the existing install base.
Thanks,
Bjorn