Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Unity not building for Android with Ads service enabled

Discussion in 'Android' started by luckie12, Dec 31, 2017.

  1. luckie12

    luckie12

    Joined:
    Aug 17, 2014
    Posts:
    165
    Im just gonna post it here, because i posted it in a wrong section,

    so i recently couldnt get Unity to build my games, thats fixed.

    But whenever i enable the ADS service, im getting an error at Gradle Build Failed.

    This is the full error log:

    As you can see, theres an error saying:

    How can one fix this?

    Its pretty frustrating haha

    Thanks for any help!
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,672
    It says you're missing NDK :) Install it
     
  3. luckie12

    luckie12

    Joined:
    Aug 17, 2014
    Posts:
    165
    Well, i pointed NDK to the right place in Preferences...
    But i still get this:

    EDIT: I added the NDK to the Path
    and now theres no STDOUT
    The 'What went wrong' part is still the same?

    So i thought, being smart, i make a new folder inside Android SDK\ and name it ndk-bundle, because its standard searching in it, but no... It still keeps giving the same error, then what i did is create a ANDROID_NDK_HOME variable and add the same folder to it, still the same error...
     
    Last edited: Jan 2, 2018
  4. luckie12

    luckie12

    Joined:
    Aug 17, 2014
    Posts:
    165
    Just found out, that when i build with `Enable built-in Ads extension` enabled, it generates the error above,

    but when i disable it, i can build.... Ads dont show up though....


    (PS: Yes, i also have the asset store's Unity Ads package...)

    EDIT:


    Issue has been fixed
    Might you have this issue:

    Disable Built-in-Ads extension at the service tab, whenever you use the Unity Ads package from the Asset Store.
     
    Last edited: Jan 3, 2018