Cannot compile for Android

About Monkey 2 Forums Monkey 2 Programming Help Cannot compile for Android

This topic contains 7 replies, has 4 voices, and was last updated by  Mark Sibly 1 year, 8 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #9593

    Holzchopf
    Participant

    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

    #9594

    abakobo
    Participant

    It 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.

    #9595

    Holzchopf
    Participant

    OK 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

    #9599

    Mark Sibly
    Keymaster

    The 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.

    #9606

    Mark Sibly
    Keymaster

    Android 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.

    #9609

    Xaron
    Participant

    I think that’s because of Admob. At least the Interstitial ads now need a minimum API level 14.

    #9616

    Holzchopf
    Participant

    Ok 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

    #9627

    Mark Sibly
    Keymaster

    it has to be MX2_ANDROID_APP_PLATFORM=android-14

    Thanks for that, was confused myself too!

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.