2013-07-03 31 views
0

我是android開發新手。我跑我的測試應用程序,我一直在values.xml文件圖片不會被android ide忘記 - android

Gradle: String types not allowed (at 'myimage.jpg' with value 'myimage.jpg') 

所以我刪除了我的main.xml文件myimage.jpg參考具有編譯錯誤信息,但我一直在具有相同的信息(我重新啓動我的IDE後清理項目)

編輯:這是我的values.xml文件

<?xml version="1.0" encoding="utf-8"?> 
<resources> 

    <dimen name="activity_horizontal_margin">16dp</dimen> 
    <dimen name="activity_vertical_margin">16dp</dimen> 

    <drawable name="myimage.jpg">hey_image_ny.jpg</drawable> 
    <drawable name="image_ny.jpg">image_ny.jpg</drawable> 
    <drawable name="oups.jpg">oups</drawable> 

    <string name="action_settings">Settings</string> 
    <string name="app_name">gproject</string> 
    <string name="hello_world">Hello world!</string> 

    <style name="AppBaseTheme" parent="android:Theme.Light"> 
     <!-- 
      Theme customizations available in newer API levels can go in 
      res/values-vXX/styles.xml, while customizations related to 
      backward-compatibility can go here. 
     --> 
    </style> 

    <style name="AppTheme" parent="AppBaseTheme"> 
     <!-- All customizations that are NOT specific to a particular API-level can go here. --> 
    </style> 

</resources> 

和我的佈局

<?xml version="1.0" encoding="utf-8"?> 

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
       android:orientation="vertical" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:background="@drawable/oups"> 

</LinearLayout> 
+0

發佈你的價值觀。 xml文件與您的佈局文件。 –

+0

@kaushaltrivedi我剛剛編輯了我的文章 – Newben

+0

你想用這些可繪製標籤實現什麼?你不應該在你的xml文件中有這樣的可繪製標籤。 – btse

回答

0

我明白了,我只好在res/drawable.xml了很多本應該被刪除的extra_files的,像這樣

<resources> 
    <drawable name="myimage.jpg">myimage.jpg</drawable> 
</resources> 

所以我刪除它,它編譯