Search code examples
androidubuntuandroid-ndkmakefilejava-native-interface

ndk assertion failure Ubuntu 13.04


When I try to run ndk-build i get this error:

/home/adam/programs/adt-bundle-linux-x86_64-20130522/android-ndk-r8e/build/core/setup-toolchain.mk:20: * Android NDK: Assertion failure: TARGET_PLATFORM is not defined . Stop.

  1. I am in the root project directory (I have also tried the jni folder but same thing)
  2. I am giving the fully qualified path of the ndk-build
  3. Not only is this happening with my new project, but this error also occurs with the sample app that comes with the ndk (hello-jni).
  4. I had no problems using ndk with Windows CMD Prompt and Cygwin. Ubuntu 13.04 is the only Linux environment i have tried.
  5. I am using ndk-r8e linuxx86_64 (as you can already tell by the error message)

Solution

  • So for one reason or another deleting the old NDK and unpacking a new one solved the problem. Same version and everything. Some files must have been corrupt.