2016-06-13 9 views
1

Eclipseで、このハイテクfilter.xmlは、 を正常に動作しますが、Androidのメーカーでは、コンパイル時にエラーを与える:サポートされていないタイプのハイテクリストは

 
Error:Execution failed for task ':app:mergeDebugResources'. > Path-to-project\app\src\main\res\values\tech_filter.xml: Error: Unsupported type 'tech-list' 

ハイテクフィルター.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> 

は、誰もがこの問題を経験していますか?これには何か解決策はありますか?

答えて

2

tech-listは値のリソースではありません。代わりにres/xml/の下に置く必要があります。このように、あなたのtech_filter.xmlのパスが

app/src/main/res/xml/tech_filter.xml 

にする必要があり、それのためのマニフェストエントリは次のようになります。

<meta-data 
    android:name="android.nfc.action.TECH_DISCOVERED" 
    android:resource="@xml/tech_filter" /> 
+0

感謝の男は、あなたが救います! –

+0

@AbrahamPraraPrakasa素晴らしい私は、なぜこれがあなたのEclipseプロジェクトで目覚めたのだろう... –

関連する問題