ドキュメント

​
​

Development

User Acquisition

Monetization

産業

Unity Ads Monetization

SDK 4.20.0

サポート対象
​

Android API reference

Unity Ads Monetization

SDK 4.20.0

サポート対象
​

このページは選択した言語では使用できません。
Android developer guides
​
​
Android developer guides
  • Android SDK integration guide
  • Unity Ads privacy guide
  • Unity Ads SDK troubleshooting guide
  • Android developer API references
  1. Unity Ads SDK Android developer monetization
  2. Unity Ads SDK integration guide for Android developers

Install the Unity Ads SDK for Android

Install the Unity Ads SDK in your Android project. Add the required dependencies to your build.gradle files and sync the build to apply the changes.
読み終わるまでの所要時間 2 分
最終更新 1ヶ月前

You can use Gradle dependencies to integrate the Unity Ads SDK. Unity supports Android 4.4 "KitKat" (API level 19) and later.
注
Unity Ads has new dependencies from SDK version 4.5.0. Manually including the linked aar file (which contains all metadata, Android manifest, classes.jar, proguard rules, and so on) will lead to runtime errors if dependencies are not properly resolved. The recommended best practice is to use a package management system such as Gradle to handle dependency management. Refer to the Android SDK integration steps for details.

Add the Unity Ads SDK to your project

重要
Java 8+ targeting will be required from the Unity Ads SDK version 4.7.0 and higher.
  1. Add the following code to the
    dependencies
    section to your app-level build.gradle file:
dependencies { implementation 'com.unity3d.ads:unity-ads:4.20.0'}
dependencies { implementation("com.unity3d.ads:unity-ads:4.20.0")}
  1. If your project is not already using Java 8+, set your Java version to 8 in build.gradle in the
    compileOptions
    section:
android { compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 }}
android { compileOptions { sourceCompatibility(JavaVersion.VERSION_1_8) targetCompatibility(JavaVersion.VERSION_1_8) }}

Advertising ID

注
If your app uses the Unity Ads SDK version 4.1 or later, you can skip this step because the SDK automatically declares the permission and can access the Advertising ID whenever it is available. Apps using the Unity Ads SDK version 4.0.1 or earlier must include the declaration manually.
When an Android user opts out of interest-based advertising or ads personalization, the advertising identifier will not be available. Publishers will receive a string of zeros in place of the identifier.
Additionally, when apps update their target to Android 13 or later, they need to declare a Google Play services normal permission in the manifest file as follows:
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
重要
Google will enforce this declaration beginning April 1, 2022. For more information, refer to the Google Play Console Help documentation on Advertising ID.
Next steps: To continue your integration, refer to the Initialize the SDK in Android documentation.

Copyright © 2026 Unity Technologies
法規事項プライバシーポリシークッキーDocumentation Terms of Use私の個人情報を販売または共有しないプライバシーに関する選択 (クッキー設定)

"Unity" の名称、Unity のロゴ、およびその他の Unity の商標は、米国およびその他の国における Unity Technologies またはその関係会社の商標または登録商標です (詳しくはこちら)。その他の名称またはブランドは該当する所有者の商標です。

一部のページは利便性向上のため機械翻訳を使用しており、内容に不正確な表現が含まれる場合があります。内容に齟齬または不一致が生じた場合は、英語版を正本とします。

  • このページ
    • Add the Unity Ads SDK to your project

    • Advertising ID


このページの問題を報告する