2016-12-03 8 views
-1

これは、それが私のstyles.xmlである私はWAMPサーバへの接続を確立しようとしていますが、私はこのエラーに重複リソースエラー

The error message :

Error:Execution failed for task ':app:mergeDebugResources'. [string/id] C:\Grad\app\src\main\res\values\dimens.xml [string/id] C:\Grad\app\src\main\res\values\strings.xml: Error: Duplicate resources

を取得しています:

<resources> 

<!-- Base application theme. --> 
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> 

    <!-- Customize your theme here. --> 
    <item name="colorPrimary">@color/colorPrimary</item> 
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item> 
    <item name="colorAccent">@color/colorAccent</item> 

    </style> 

</resources> 

dimens.xml :

<resources> 
    <!-- Default screen margins, per the Android Design guidelines. --> 
    <dimen name="activity_horizontal_margin">16dp</dimen> 
    <dimen name="activity_vertical_margin">16dp</dimen> 
    <string name="id" type="string">ID</string> 
    </resources> 

dimens.xml:

その本当に、複製dimen.xmlから削除
<resources> 
     <!-- Example customization of dimensions originally defined in  res/values/dimens.xml 
      (such as screen margins) for screens with more than 820dp of  available width. This 
     would include 7" and 10" devices in landscape (~960dp and ~1280dp  respectively). --> 
    <dimen name="activity_horizontal_margin">64dp</dimen> 

    </resources> 

のstrings.xml(W820デシベル)

<resources> 
<string name="app_name">Grad</string> 
<string name="send">Send</string> 
<string name="id" type="string">ID</string> 
</resources> 
+0

dimensの内部で文字列のIDを入れないようにしてくださいする必要がありますのstrings.xmlで

  • 答えて

    3

    dimens.xml : 
    <string name="id" type="string">ID</string> 
    
    strings.xml (w820 db) 
    <string name="id" type="string">ID</string> 
    
    2

    単純にdimens.xmlでdimens

    • から削除削除

      それだけで

      <string name="my_id" type="string">ID</string>