1

I am trying to import an old Android Project, and I am getting several errors like this:

error: Error: No resource found that matches the given name (at 'entries' 
with value '@array/pref_sync_frequency_titles').

in the xml folder. All four files are corrupted with the same kinds of errors. I have no idea where to start looking.

1
  • Do you have any more information? Could it be a problem with the SDK version? Feb 7, 2013 at 20:32

1 Answer 1

2

It means that you don't have pref_sync_frequency_titles array defined. Definition of such an array is needed by your other files which, like you say, are "corrupted". An error is thrown since they are not found. Such an array should be an XML file pref_sync_frequency_titles.xml in res/values directory. You can create it straight from Eclipse ADT (if you are developing using it) - just right click on the project and select New Android XML file.

There are two types of arrays:

  • integer
  • typed

The first type is described here: http://developer.android.com/guide/topics/resources/more-resources.html#IntegerArray

The second one - here: http://developer.android.com/guide/topics/resources/more-resources.html#TypedArray

Unfortunately I can't tell you which type you have to create because that depends on the context in which such an array is used. But, both these links tell in which directories to put them, how to reference them from other XML files and contain samples that should really help you in creating them.

Not the answer you're looking for? Browse other questions tagged or ask your own question.