「Monaca/admob/admob-free/mediation/他」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→以下エラーが発生する場合) |
|||
| 行60: | 行60: | ||
url "https://maven.google.com" | url "https://maven.google.com" | ||
} | } | ||
| + | jcenter() | ||
maven { | maven { | ||
url 'http://fan-adn.github.io/nendSDK-Android-lib/library' | url 'http://fan-adn.github.io/nendSDK-Android-lib/library' | ||
| 行72: | 行73: | ||
url "https://adcolony.bintray.com/AdColony" | url "https://adcolony.bintray.com/AdColony" | ||
} | } | ||
| − | |||
} | } | ||
} | } | ||
2020年6月17日 (水) 18:56時点における版
目次
他色々のメディエーションを使いたい場合
androidの場合
androidでは以下をplugin.xmlに追加する
<platform name="android">
<framework src="build-extras.gradle" custom="true" type="gradleReference"/>
<framework src="com.unity3d.ads:unity-ads:+" />
<framework src="com.google.ads.mediation:unity:+" />
<framework src="com.facebook.android:audience-network-sdk:+" />
<framework src="com.google.ads.mediation:facebook:+" />
<framework src="net.nend.android:nend-sdk:5.4.2" />
<framework src="com.google.ads.mediation:nend:+" />
<framework src="com.android.support:appcompat-v7:26.1.0" />
<framework src="com.android.support.constraint:constraint-layout:1.1.3" />
<framework src="com.google.android.gms:play-services-basement:15.0.1" />
<framework src="com.google.android.gms:play-services-ads:15.0.1" />
<framework src="com.google.android.gms:play-services-location:15.0.1" />
<dependency id="cordova-plugin-enable-multidex" />
</platform>
以下エラーが発生する場合
> Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
> Could not resolve com.google.android.gms:play-services-basement:[15.0.1,16.0.0).
Required by:
project :app > com.google.android.gms:play-services-location:15.0.1
project :app > com.google.android.gms:play-services-places-placereport:15.0.1
> Failed to list versions for com.google.android.gms:play-services-basement.
おそらくversionが競合してるので、以下のように、15.0.1にするとか
<framework src="com.google.android.gms:play-services-basement:15.0.1" />
以下エラーが発生する場合
> Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
> Could not resolve com.google.android.gms:play-services-tasks:[15.0.1,16.0.0).
Required by:
project :app > com.google.android.gms:play-services-location:15.0.1
> Failed to list versions for com.google.android.gms:play-services-tasks.
おそらくversionが競合してるので、以下のように、15.0.1にするとか
<framework src="com.google.android.gms:play-services-tasks:15.0.1" />
maven設定方法
plugin.xml
<platform name="android">
<framework src="build-extras.gradle" custom="true" type="gradleReference"/>
</platform>
build-extras.gradle
ext.postBuildExtras = {
allprojects {
repositories {
maven {
url "https://maven.google.com"
}
jcenter()
maven {
url 'http://fan-adn.github.io/nendSDK-Android-lib/library'
}
maven {
url 'https://github.com/zucks/ZucksAdNetworkSDK-Maven/raw/master/'
}
maven{
url "https://imobile-maio.github.io/maven"
}
maven {
url "https://adcolony.bintray.com/AdColony"
}
}
}
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:26.+'
}
}
}
iosの場合
plugin.xmlに追加
<platform name="ios">
<pods use-frameworks="true">
<pod name="GoogleMobileAdsMediationUnity" spec="~> 3.1"/>
<pod name="GoogleMobileAdsMediationFacebook" spec="~> 5.4" />
<pod name="GoogleMobileAdsMediationNend" spec="~> 5.4.1.0" />
</pods>
</platform>
nendのtestId
https://github.com/fan-ADN/nendSDK-ios/wiki/Verification
https://github.com/fan-ADN/nendSDK-android/wiki/Verification
参考
https://developers.google.com/admob/unity/mediation/nend
https://bintray.com/google/mobile-ads-adapters-unity/GoogleMobileAdsNendMediation#files/Google
