How to Import Unity Ads SDK in Android Studio

Import Unity Ads SDK in Android Studio

This tutorial will guide you how to import Unity Ads SDK in Android Studio.

The most simple steps.

  1. Download and unzip master zip from github.
  2. Go Android Studio File --> Open Module Settings --> click plus button.
  3. When dialog open, you should choose Eclipse project module.
  4. Select the unity-ads package in the master project.
  5. And Finish.

Stay happy to code 🙂

To answer your question. You shouldn't need to put anything there. It's only if you want to be able to view the source of the library - intelli-sense.

That being said, I didn't like that setup and went a different route which I found easier.

Here's what I did.

  1. Download and unzip the master zip (pre-built packages)
  2. Copy or move the ./unity-ads-sdk-master/unity-ads/libs/unity-ads.jar to your projects ./libs dir.
  3. Copy the permissions and Activity definition from the provided AndroidManifest.xml file.
    
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />
  4. Might need to refresh from your Gradle tool window.
  5. Follow rest of instructions starting from Integrate Unity Ads to Your Codebase

I will be soon uploading a video tutorial, till then please refer to this written tutorial.


Sources:

  • http://stackoverflow.com/questions/30480158/import-unity-ads-sdk-in-android-studio
  • https://unityads.unity3d.com/help/monetization/integration-guide-android

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz