19

I'm using the Android ndk-r8e, and I'm having a problem building a project. I get the above-mentioned error message. I've checked my AndroidManifest.xml and minSdkVersion is set to 15, which is what I intend. According to the error message, APP_PLATFORM is set to android-14, which is smaller, not larger than minSdkVersion, so why am I getting the error?

Thanks.

user1118764
  • 9,255
  • 18
  • 61
  • 113

1 Answers1

24

Check your jni/Application.mk

You should have following line:-

APP_PLATFORM := android-14

If you do not have that line then version of your SDK is taken from project.properties files.

Max
  • 6,286
  • 5
  • 44
  • 86
  • 1
    My project does not have a jni/Application.mk file. In project.properties, target is set to android-15. – user1118764 Jan 14 '14 at 01:42
  • 1
    My project only has jni/Android.mk. In project.properties, target is set to android-15. I have tried to create a new jni/Application.mk with APP_PLATFORM := android-14 as its only line, but that didn't work either. – user1118764 Jan 14 '14 at 02:52
  • 1
    You should create `jni/Application.mk` It is fine to have 1 line `APP_PLATFORM := android-14` Second line might be `APP_ABI := all`. Do clean `ndk-build clean` and if message has not gone try to build 'HelloJNI` from `$NDK/samples` – Max Jan 14 '14 at 11:46
  • 3
    @Max What about the other way? My "AndroidManifest.xml" has no "minSdkVersion" in it, and only recently the NDK-BUILD started complaining. My Application.mk in teh JNI is set for APP_PLATFORM := android-19... My build.gradle has the minSdkVersion set to 19. I even tried to add the minSdkVersion to the Manifest XML, but no change. It did NOT spit out warnings few months ago. This moving target environment really sucks. – SpacemanScott May 24 '18 at 17:26