【发布时间】:2016-07-04 13:28:58
【问题描述】:
我正在使用 Cordova 5.0.0 构建适用于 Android 的 Cordova 应用程序。我正在使用没有插件的谷歌地图,它必须没有插件。 我使用白名单插件包含此脚本和元标记 .also Cordova。
<!-- Meta tag -->
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
<!-- Google Maps-->
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=true"></script>
它给了我这个错误:
Refused to load the script 'https://maps.googleapis.com/maps/api/js?sensor=true' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval'".
【问题讨论】:
-
@Nazir Dogan,以下任何一项对您有用吗?
标签: android google-maps cordova