Search Unity

Unity Ads SDK version 2.0.3 broken on Android - don't upgrade

Discussion in 'Unity Ads & User Acquisition' started by rasmus-unity, Sep 9, 2016.

  1. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    Ok, we messed up and released a SDK version on Asset Store without actually testing that it worked on both iOS and Android. And unfortunately it turns out that Unity Ads version 2.0.3 won't compile for Android, with following error:

    Code (CSharp):
    1. [AndroidManifest.xml:3] Main manifest has <uses-sdk android:targetSdkVersion='23'> but library uses targetSdkVersion='24'
    We will release a new asset store package next week. Until then don't upgrade if you are building for Android. If you have already upgraded, and was planning on spending the weekend on developing your game, you can download version 2.0.2 from here: http://cdn.unityads.unity3d.com/unitypackage/2.0.2/UnityAds.unitypackage

    We apologize for any troubles this might cause.

    Best regards,
    Rasmus, Unity Ads
     
  2. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    UPDATE: We have now rolled back to 2.0.2 on Asset Store. Keeping this post in case someone got version 2.0.3 and cannot build for Android.
     
  3. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    427
  4. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    Are you running in editor or on device. If editor, make sure you have selected iOS or Android as target in Build Settings window. If on device, please check device log for any UnityAds related errors

    See my reply on that thread. I need some more info.

    Thanks,
    Rasmus
     
  5. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    427
    In Windows Unity Editor
    Build Target: Android

    syncing my assets folder to a mac and running the same scene shows fake ads in editor
    just not on windows in editor
     
  6. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    We've tested new SDK 2.0.4 asset store package, which fixes following issues:

    - The Android build issue in 2.0.3
    - IsReady() always returns false in Windows Editor
    - Game audio keeps playing while ads and endscreen is shown on iOS

    This version should be available on Asset Store tomorrow.

    Thanks for your feedback on these issues.
     
  7. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    427
  8. MrDasix

    MrDasix

    Joined:
    Feb 15, 2015
    Posts:
    64
  9. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    @MrDasixMr: No, it's no longer beta. Why do you think it would still be in beta.

    /Rasmus
     
  10. MrDasix

    MrDasix

    Joined:
    Feb 15, 2015
    Posts:
    64

    Because the integration is without using the services window in unity :C, and its a different integration.
     
  11. screenname_taken

    screenname_taken

    Joined:
    Apr 8, 2013
    Posts:
    663
    I'm also waiting the Editor to be updated because for some reason i couldn't make the asset work.
     
  12. dreamer-

    dreamer-

    Joined:
    Dec 9, 2016
    Posts:
    25
    @rasmus-unity I also have a similar issue. But I use Unity ads from the services tab.
    I get the following errors:

    1.
    Main manifest has <uses-sdk android:targetSdkVersion='19'> but library uses targetSdkVersion='23'

    2.
    KeyNotFoundException: The given key was not present in the dictionary.
    System.Collections.Generic.Dictionary`2[System.String,System.Object].get_Item (System.String key) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150)
    UnityEditor.Android.PostProcessor.PostProcessorContext.Get[String] (System.String key)
    UnityEditor.Android.PostProcessor.Tasks.PublishPackage.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessAndroidPlayer.Launch (BuildTarget target, System.String installPath)
    UnityEditor.Android.AndroidBuildPostprocessor.LaunchPlayer (BuildLaunchPlayerArgs args)
    UnityEditor.PostprocessBuildPlayer.Launch (BuildTarget target, System.String path, System.String productName, BuildOptions options) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:151)
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

    These errors started to occur when I upgraded unity from 5.4 to 5.5.
    Please help to resolve this issue.
     
    Last edited: Jan 25, 2017
  13. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    Just tested here with 5.5.1f1 and didn't see this issue. Are you using engine integrated Ads SDK or from asset store, and which Android version are you building for?

    /Rasmus
     
  14. dreamer-

    dreamer-

    Joined:
    Dec 9, 2016
    Posts:
    25
    @rasmus-unity
    I am using the unity engine integrated Ads SDK.
    I have set the minimum api level to 9 under player settings.
    The Unity AdMob plugin sets the target sdk to 19.
    The android manifest for unity ads sdk has target sdk of 23. This seems to be causing the conflict.
    Currently I am making it work by changing the target sdk for AdMob plugin to 23. Is this the correct way to proceed?