unity : admob入れる unity 5.3.4
Google Mobile Ads Unity Plugin
[https://github.com/googleads/googleads-mobile-unity]
version 3.0.3を入れてみます。
Document
[https://developers.google.com/admob/android/games#unity]
Google Play Service : androidの更新ツールで更新。
Google Mobile Ads SDK ( iOS v7.7.0
https://developers.google.com/admob/ios/download?hl=ja#downloadios
===
Plugins/iOS にgooglemobileads.frameworkを入れるだけでした。
inspectorでiOSにチェックが入っていればOK
=== 以下は間違いでした-.-; ===
* googlemobileads.frameworkをxcodeに入れる時は
Add Files to Unity-iPhoneから、入れるとコードも入ってlibraryにも反映されます。
x 直接 Build Phasesのところに入れるとコピーされないので、ダメなようです。
@import GoogleMobileAds;
コピーできていないとここでエラーになりました。
さらに、これを毎回エラーになったので何かなと
Build Settings -> Search Paths -> Framework Search Paths
にgooglemobileads.frameworkを置いてあるpathを入れたら大丈夫でした!
$(SRCROOT)/myframeworks とかで
5.3.4が出たので 更新してみます。
メモ。
[http://forum.unity3d.com/threads/admob-problem-with-interstitial-ads-and-unity-5-3-3.390749/]
### android ###
CommandInvokationFailure: Failed to re-package resources. See the Console for details.
/Applications/android/android-sdk-macosx/build-tools/23.0.2/aapt package --auto-add-overlay -v -f -m -J gen -M
Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
/Applications/android/android-sdk-macosx/build-tools/23.0.2/aapt package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "/Applications/android/android-sdk-macosx/platforms/android-23/android.jar" -F bin/resources.ap_ --extra-packages
こんな感じのエラーで
http://answers.unity3d.com/questions/760989/failed-to-re-package-resources-2.html
To fix this error, you have to copy the version.xml file from
android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values/
into Assets/Plugins/Android/res/values/ of your Unity project's folder.
version.xmlをコピーすると良いらしい