将特定的库从android SDK添加到unity项目

问题描述

我正在尝试将Applovin广告添加到unity项目中,并且需要添加新的播放服务SDK

将Google Play服务添加到您的应用

由于Google的新要求,您需要集成Google 将Services SDK插入您的应用。

这是强制性的;没有Google Play服务,SDK无法 功能

当我联系applovin时,他们要求我将此库添加到我的项目中

@bot.event async def on_message(message): bad_words = ['badword1','badword2','badword3','badword4','badword5','badword6'] if message.author == bot.user: return for word in bad_words: if 0 < message.content.count(word) < 2: await message.channel.send("{},bitte achte auf Deine Wortwahl.".format(message.author.mention)) await message.delete() break else: await bot.process_commands(message)

我该怎么做?我没有使用android studio,而是直接从unity引擎导出。

解决方法

applovin的答案

如果尚未使用自定义mainTemplate.gradle,则可以在Android PlayerSettings下的Publishing>Custom Main Gradle Template.中启用它 将此行添加到您的mainTemplate.gradle文件中:

implementation 'com.google.android.gms:play-services-ads-identifier:16.0.0'

示例:

dependencies {
    implementation fileTree(dir: 'libs',include: ['*.jar'])
    implementation 'com.google.android.gms:play-services-ads-identifier:16.0.0'
**DEPS**}

这些步骤适用于任何SDK实现,请考虑自己在Gradle文件中。