「Monaca/admob/admob-free」の版間の差分
ナビゲーションに移動
検索に移動
| 33行目: | 33行目: | ||
==Security Policyエラーが発生== | ==Security Policyエラーが発生== | ||
Refused to load the script 'https://debug.monaca.mobi/target/target-script-min.js' because it violates the following Content Security Policy directive: "default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'". Note that 'script-src-elem' was not explicitly set, so 'default-src' is used as a fallback. | Refused to load the script 'https://debug.monaca.mobi/target/target-script-min.js' because it violates the following Content Security Policy directive: "default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'". Note that 'script-src-elem' was not explicitly set, so 'default-src' is used as a fallback. | ||
==脆弱性の警告== | |||
`npm audit fix` to fix them or `npm audit` for details | |||
==json404のエラーが発生== | ==json404のエラーが発生== | ||
2020年5月19日 (火) 10:03時点における版
ダウンロード&インストール
https://github.com/ratson/cordova-plugin-admob-free
どちらか行う
- githubでforkしてmonacaへインポート
- zipでDLしてmonacaへインポート
- インポートするとアップデートするボタンが出るので押す。
- www/admob.jsができてるので確認
- www/index.htmlなどがざっくりなくなるのでexamples/basic/からwwwをコピーしてプロジェクト直下にペーストする
確認
package.jsonに以下が記載されてることを確認
"cordova": {
"id": "cordova-plugin-admob-free",
"platforms": [
"android",
"ios"
]
},
失敗したら・・
ターミナルから
npm install npm run build
Security Policyエラーが発生
Refused to load the script 'https://debug.monaca.mobi/target/target-script-min.js' because it violates the following Content Security Policy directive: "default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'". Note that 'script-src-elem' was not explicitly set, so 'default-src' is used as a fallback.
脆弱性の警告
`npm audit fix` to fix them or `npm audit` for details
json404のエラーが発生
{"status": "fail", "code": 404," message": "Not found"}