Localization Example Issue
I am testing localization example given on http://developer.android.com/resources/tutorials/localization/index.html. For this i have created android 2.3.3 level 10 application.
There is a step mentioned in the tutorial:
Localize the Images
As shown in Table 2, the application needs six more drawable folders, each containing a flag.png icon. Add the needed icons and folders to your project:
Save this German flag icon as res/drawable-de-rDE/flag.png in the application's project workspace.
For example: 1. Click the link to open the flag image. 2. Save the image in your-workspace/HelloL10N/res/drawable-de-rDE/ .
But in the res folder i have three folders drawable-hdpi, drawable-mdpi and drawable-ldpi.
I know that it is for different screen resolutions. Similarly i have values-dr folder containing strings.xml file.
I have made drawable-hdpi-de-rDE folder for german and similar folders for other languages. But i am getting error:
[2011-04-04 14:34:32 - HelloL10N] (skipping index file 'C:\Documents and Settings\abc\workspace\HelloL10N\res\drawable-hdpi\Thumbs.db')
[2011-04-04 14:34:32 - HelloL10N] C:\Documents and Settings\abc\workspace\HelloL10N\res\values-fr\strings.xml:4: error: Apostrophe not preceded by \ (in Irai-je te comparer au jour d'été?)
[2011-04-04 14:35:14 - HelloL10N] (skipping index file 'C:\Documents and Settings\abc\workspace\HelloL10N\res\drawable-hdpi\Thumbs.db')
[2011-04-04 14:35:14 - HelloL10N] invalid resource directory name: C:\Documents and Settings\abc\workspace\HelloL10N\res/drawable-hdpi-de-rDE
[2011-04-04 14:35:14 - HelloL10N] invalid resource directory name: C:\Documents and Settings\abc\workspace\HelloL10N\res/drawable-hdpi-en-rCA
[2011-04-04 14:35:14 - HelloL10N] invalid resource directory name: C:\Documents and Settings\abc\workspace\HelloL10N\res/drawable-hdpi-fr-rCA
[2011-04-04 14:35:14 - HelloL10N] invalid resource directory name: C:\Documents and Settings\abc\workspace\HelloL10N\res/drawable-hdpi-fr-rFR
[2011-04-04 14:35:14 - HelloL10N] invalid resource directory name: C:\Documents an开发者_StackOverflowd Settings\abc\workspace\HelloL10N\res/drawable-hdpi-ja-rJP
I am unable to understand the reason for such an issue.
One more thing i am curious to know whether i have to create three resources in place of one for e.g. i have one image file so i have to upload it in drawable-hdpi, drawable-mdpi and drawable-ldpi with different screen resolutions?
Please help me on this
Thanks
Pankaj
To do what you want, you must create folders named like this : drawable-de-rDE-hdpi, drawable-de-rDE-mdpi, drawable-de-rDE-ldpi, ...
I hope will be helpful
use drawable-de-rDE-mdpi instead of drawable-hdpi-de-rDE .
I was experiencing the same problem in another Android example then I deleted those Thumds.db files, and that fixed it.
精彩评论