不承认我有我的清单如下一行:安卓:targetApi在清单
<intent-filter android:autoVerify="true">
但我得到一个皮棉警告:
Attribute autoVerify is only used in API 23 and higher (current min is 16)
所以我改成了这个样子(根据Android工作室给我的建议):
<intent-filter android:autoVerify="true" tools:targetApi="M">
然后我在构建apk时收到这个错误:
Error:java.lang.RuntimeException: [path_to_manifest]/AndroidManifest.xml:58:13-67:29: Error: Invalid instruction 'targetApi', valid instructions are : REMOVE,REPLACE,STRICT
Caused by: java.lang.IllegalArgumentException: No enum constant com.android.manifmerger.AttributeOperationType.TARGETAPI
如何摆脱这个错误,同时仍然摆脱了皮棉警告?
编辑: 我尝试了“干净的项目”和“无效的缓存并重新启动” - 既无法解决错误。
问题上问题跟踪打开:
https://code.google.com/p/android/issues/detail?id=211805
这听起来像一个错误,你应该在这里报告:http://tools.android.com/filing-bugs –
谢谢 - 我已经提出了一个问题。 – Jon
https://code.google.com/p/android/issues/detail?id=211805 – QED