「Monaca/admob/admob-free」の版間の差分
ナビゲーションに移動
検索に移動
| 34行目: | 34行目: | ||
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 install実行時の脆弱性の警告== | ||
`npm audit fix` to fix them or `npm audit` for details | `npm audit fix` to fix them or `npm audit` for details | ||
以下で確認 | |||
npm audit fix | |||
==json404のエラーが発生== | ==json404のエラーが発生== | ||
2020年5月19日 (火) 10:04時点における版
ダウンロード&インストール
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 install実行時の脆弱性の警告
`npm audit fix` to fix them or `npm audit` for details
以下で確認
npm audit fix
json404のエラーが発生
{"status": "fail", "code": 404," message": "Not found"}