简体   繁体   中英

Error with detecting res/xml and preference activity

I am trying to add a Preference activity in my andorid App, but my eclipse is not recognizing the res/xml folder and addPreferenceFromResources() method is showing as deprecated. So Please help how I can proceed further further. BTW I am reading the Hello Android by Ed Burnette. This thing is mention in Chapter 3 page 54. Please help me guys.

Regards Simran Preet Singh

Clean and build the project. Replace PreferenceActivity by using PreferenceFragment.

Check if you are importing the following in your header statements:

import android.R;

If you are , delete it and see if you can pick up xml/prefs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM