【发布时间】:2016-10-13 08:48:48
【问题描述】:
在 Eclipse 中,这个 tech-filter.xml 工作正常, 但在 Android Studio 中,它会在编译时出错:
错误:任务“:app:mergeDebugResources”执行失败。 > 项目路径\app\src\main\res\values\tech_filter.xml:错误:不支持的类型“技术列表”技术过滤器.xml:
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<tech-list>
<tech>android.nfc.tech.IsoDep</tech>
</tech-list>
</resources>
AndroidManifest.xml:
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.nfc.action.TECH_DISCOVERED"/>
</intent-filter>
<meta-data
android:name="android.nfc.action.TECH_DISCOVERED"
android:resource="values/tech_filter" />
</activity>
有人遇到过这个问题吗?有什么解决办法吗?
【问题讨论】:
标签: android xml android-studio nfc intentfilter