2012-01-10 61 views
2

我有一個標準的應用程序。 我需要爲每個客戶端更改一些文本,設置和圖形。 這樣每個客戶都可以獲得爲其品牌定製的應用程序。覆蓋庫中的drawable

我想這樣做,通過使標準的應用程序庫。 我現在可以覆蓋文本在string.xml

,但是當我想改變(比如)splashscreen.png我得到這個錯誤:

Error: No resource found that matches the given name (at 'drawable' with value '@drawable/splashscreen.png')

我在做什麼錯?還是有更好的方法來解決這個問題?

在此先感謝。

回答

2

好吧,我發現這個問題。 我在目錄「drawable」中有我的默認drawable。 當我將目錄名稱更改爲「drawable-ldpi」時,一切正常。

0

您是否將標準應用程序鏈接爲白色標記的應用程序中的庫?完成後,只需將新圖像/繪圖放置在白標籤應用程序的res/drawable文件夾中即可。確保圖像/繪圖與標準應用程序中的圖像/繪圖具有相同的名稱。

你可能想讀這http://goo.gl/j9EMc

+0

我這樣做,但我得到了很多xml中的所有drawables都找不到資源的錯誤:error:Error:找不到與給定名稱匹配的資源('drawable'with value' @繪製/防濺')。 – 2012-01-10 11:01:24

0

我不能添加評論給史蒂文斯特拉特曼斯接受的答案,但在這篇文章http://developer.android.com/guide/topics/resources/localization.html據說所有的默認資源應該存在。因此,您應該將splashscreen.png添加到默認文件中。在文章中他們談論地區,但所有資源都是一樣的。

Whenever the application runs in a locale for which you have not provided locale-specific text, Android will load the default strings from res/values/strings.xml. If this default file is absent, or if it is missing a string that your application needs, then your application will not run and will show an error.