Building for Android ( with AdMob )

About Monkey 2 Forums Monkey 2 Programming Help Building for Android ( with AdMob )

Tagged: ,

This topic contains 5 replies, has 4 voices, and was last updated by  CopperCircle 1 year, 6 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #9583

    Playniax

    Participant

    Some of you may know that I have just released my first Monkey2 / Pyro2 game Revengestar for PC / Mac and Android ( iOS version will be next ).

    For people who are interested in publishing something on Google Play with AdMob integrated below a copy of my notes on how to build for Android after you have Android Studio installed and configured…

    1. Build project in MX2 for Android target

    2. Open the project in Android Studio and let Gradle do it’s job

    3. If you need Admob do the following otherwise you can skip this:

    * Use the Android Studio SDK Manager->SDK Tools to install Google Play services if necessary.

    * Load the android studio project you want to build.

    * Select ‘View->Module Settings’ menu. Note: for reasons known only to google, you must have ‘app’ in the ‘project’ pane selected for this option to appear!

    * Select ‘Dependencies’ Tab.

    * Hit green ‘+’ at top right.

    * Select ‘1. Library Dependency’.

    * Select ‘com.google.android.gms:play-services-ads’.

    Now in order to prevent this error:

    Error:Execution failed for task ‘:app:processDebugManifest’.
    > Manifest merger failed : uses-sdk:minSdkVersion 10 cannot be smaller than version 14 declared in library [com.google.android.gms:play-services-ads:11.0.2] C:\Users\Tony\.android\build-cache\2e6a1bf744e3d358c7192002615b4e56c3725e5b\output\AndroidManifest.xml
    Suggestion: use tools:overrideLibrary=”com.google.android.gms.ads.impl” to force usage

    Open your build.gradle file ( can be found in for example: revengestar.products\Android\app ) and change the minSdkVersion 8 in minSdkVersion 14 and Clean project!

    ( source: https://stackoverflow.com/questions/20902100/android-studio-what-is-the-right-way-to-change-targetsdkversion )

    I made version 14 default in my MX2 products template.

    3. Run App!

    The biggest issues was the minimum of MX2 docs on this but nothing that can’t be found out. Actually, because I never worked with Android Studio before this was the thing that took the most time.

    Publishing on Google Play was easy once you done it before. Still some headscratching moments though but that is because of some weird Google Play behaviour and not because of MX2.

    Next I will be publishing on the AppStore. Let’s see how that goes ?

    Hope this helps anyone!

    #9587

    nerobot

    Participant

    useful to know it.

    #9740

    monkeyplotter2

    Participant

    Thanks for sharing Playniax, very helpful.

    #9769

    CopperCircle

    Participant

    Great thanks.

    #9806

    Playniax

    Participant

    Anyone here did AppStore submission? With monkey or someting else. I need to do this soon with Revengestar so any pointers would help!

    #9811

    CopperCircle

    Participant

    Hi, I have published loads of stuff to the AppStore, just make sure you fill out all the meta data on the iTunesConnect app page correctly, also I use this to create all the different icons for the package: https://makeappicon.com/

    You will also need to create all the different launch screen sizes, without those the app may launch in the incorrect resolution on some iOS devices.

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