error: No resource identifier found for attribute 'entriesValues' in package 'android'
line: <ListPreference

error: Error: No resource found that matches the given name (at 'entries' with value '@strings/list').
line: anroid:entries="@strings/list"

error: Error: No resource found that matches the given name (at 'entriesValues' with value '@strings/lValues')
line: android:entriesValues="@strings/lValues"

res > xml > acitivity_prefs.xml

<?xml version="1.0" encoding="utf-8"?>
<Preference xmlns:android="http://schemas.android.com/apk/res/android" >

    <ListPreference
        android:title="list"
        android:key="list"
        android:summary="This is a list to choose from"
        android:entries="@strings/list" 
        android:entriesValues="@strings/lValues"
       ></ListPreference>

</Preference>

there are no error in strings.xml but i though i should show it so you can see how i am creating array.
res > values > strings.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string-array name="list"> 
        <item>Option 1 </item>    
        <item>Option 2 </item>    
        <item>Option 3 </item>    
        <item>Option 4 </item>   
    </string-array>

     <string-array name="lValues">
         <item>1 </item>
         <item>2 </item>
         <item>3 </item>
         <item>4 </item>
     </string-array> 
</resources>

Should be @array/list not strings/list

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.