【发布时间】:2018-07-22 01:08:15
【问题描述】:
我在清单文件中添加了 EnableSafeBrowsing。这基于此处提供的信息:https://android-developers.googleblog.com/2017/06/whats-new-in-webview-security.html
当我对我的应用程序运行 Lint 分析时,我在此 Manifest 语句中收到以下警告:Element meta-data is not allowed here(此检查突出显示 Android 资源文件和 AndroidManifest.xml 中不允许的 XML 标记)
<meta-data
android:name="android.webkit.WebView.EnableSafeBrowsing"
android:value="true" />
此时我正在取消此警告 (<!--suppress AndroidElementNotAllowed -->) 。是否有任何消息表明这是否或何时不再被 Lint 视为警告?
清单中的位置:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.xxxxx.xxxxxx">
<!--suppress AndroidElementNotAllowed -->
<meta-data
android:name="android.webkit.WebView.EnableSafeBrowsing"
android:value="true" />
【问题讨论】:
-
这实际上取决于它在清单中的位置。添加整个清单
-
我把它放在最上面,就像博客中显示的那样(我会更新问题)
标签: android android-manifest lint