About Monkey 2 › Forums › Monkey 2 Programming Help › Cannot compile for Android
Tagged: Android APK NDK
This topic contains 7 replies, has 4 voices, and was last updated by 
 Mark Sibly
 1 year, 8 months ago.
- 
		AuthorPosts
 - 
		
			
				
July 29, 2017 at 12:48 pm #9593
Hi there
I’m new to Monkey2. Used to program a lot in BlitzMax but wanted to try making apps for Android. I’m still trying btw but can’t get it to work. Maybe you can help
When I try to compile, let’s say, mojotest, I get the following (of course there’s more but the spam filter doesn’t seem to like it):
…
Android NDK: 10 is unsupported. Using minimum supported version android-14.
…
Application built:Done.
But there is no apk. Also that NDK warning is bugging me.
What am I doing wrong? Could you help me please? =)
Thanks and regards
Holzchopf
PS: Damn spam filter. The originial post contained much more information but then I always got told message seems to be spam
July 29, 2017 at 2:18 pm #9594It is not building an apk.. It’s building an Android project that you have to open in Android studio.
There’s a short explanation in the language reference intergrated docs.July 29, 2017 at 3:11 pm #9595OK thanks
Before messing up something: The docs say
Install the Android 7.0 (Nougat) SDK Platform (API Level 24) using android studio via ‘SDK Manager’.
Does it have to be API Level 24? I’d like to run the app on my phone with KitKat (API 19) and thus installed that SDK Platform. Or won’t this work due to Monkey2 requiring API 24 or something?
Or there’s some sort of backward compatibilty I’m not aware of – yeah, I’m a total Android newb
July 30, 2017 at 5:11 am #9599The SDK you install is not related to the versions of android the output app can run on. In general, you should always use the very latest SDK as this may in fact even include fixes for older targets.
Note that the ‘minSdkVersion’ and ‘maxSdkVersion’ entries in the android manifest file are *really* badly named! They really should be called ‘minApiVersion’ or something.
By default, a monkey2 android app should run OK on API 10 (Gingerbread!) or later. At this point, the only thing ‘flash’ a monkey2 app needs is GLES2.0 and this was added years ago.
July 30, 2017 at 9:33 pm #9606Android NDK: 10 is unsupported. Using minimum supported version android-14.
Ok, a bit more information on this. It looks like the latest NDK only supports android 14 (Ice Cream Sandwich) or later so this will be the new minimum API supported by monkey2 as of now!
You can still build for old apis by using older NDKs, tweaking the manifest etc. Also, there’s a line in bin/env_windows.txt:
MX2_ANDROID_APP_PLATFORM=10 ‘soon to be 14!
That controls the API used by the NDK that you’ll also be able to change.
July 31, 2017 at 7:14 am #9609I think that’s because of Admob. At least the Interstitial ads now need a minimum API level 14.
July 31, 2017 at 12:36 pm #9616Ok it seems to work now, thanks!
btw when I put MX2_ANDROID_APP_PLATFORM=14 it doesn’t work, it has to be MX2_ANDROID_APP_PLATFORM=android-14
August 1, 2017 at 12:11 am #9627it has to be MX2_ANDROID_APP_PLATFORM=android-14
Thanks for that, was confused myself too!
 - 
		AuthorPosts
 
You must be logged in to reply to this topic.