|
|
(同じ利用者による、間の18版が非表示) |
行1: |
行1: |
− | ==admobプラグインのインストール==
| + | [[Javascript/reactnative/admob/expo/基本]] |
− | $ expo install expo-ads-admob
| + | |
| | | |
− | app.json にandroidとiosを追加
| + | [[Javascript/reactnative/admob/expo/mediation]] |
− | <pre>
| + | |
− | {
| + | |
− | "android": {
| + | |
− | "config": {
| + | |
− | "googleMobileAdsAppId": "ca-app-pub-3940256099942544~3347511713" // sample id, replace with your own
| + | |
− | }
| + | |
− | },
| + | |
− | "ios": {
| + | |
− | "config": {
| + | |
− | "googleMobileAdsAppId": "ca-app-pub-3940256099942544~1458002511" // sample id, replace with your own
| + | |
− | }
| + | |
− | },
| + | |
− | }
| + | |
− | </pre>
| + | |
− | | + | |
− | ===以下エラーが出たとき===
| + | |
− | [Unhandled promise rejection: TypeError: _expoAdsAdmob.AdMobInterstitial.setTestDeviceIDAsync is not a function.
| + | |
− | setTestDeviceIDAsyncでなく、setTestDeviceIDを使う
| + | |
− | | + | |
− | AdMobInterstitial.setTestDeviceID is deprecated. Test device IDs are now set globally. Use AdMob.setTestDeviceIDAsync instead.
| + | |
− | setTestDeviceIDでなく、setTestDeviceIDAsyncを使う
| + | |
− | | + | |
− | ==参考==
| + | |
− | https://honmushi.com/2019/11/28/expo-admob/
| + | |
2020年7月17日 (金) 16:39時点における最新版
Javascript/reactnative/admob/expo/基本
Javascript/reactnative/admob/expo/mediation