Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9097361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:05:32+00:00 2026-06-17T00:05:32+00:00

I am trying to create a Preference Activity but i get the following error.

  • 0

I am trying to create a Preference Activity but i get the following error.

R cannot be resolved to a variable

SettingsPreference.java

package com.m7.nomad.preferences;

import android.os.Bundle;
import android.preference.PreferenceActivity;

public class SettingsPreference extends PreferenceActivity  {


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        addPreferencesFromResource(R.xml.preferences_settings);
    }
}

res/xml/preferences_settings.xml

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

    <PreferenceScreen
        android:key="settingsPrefScreen"
        android:title="Account Settings" >
        <Preference
            android:key="profilePref"
            android:title="Your Profile" />
        <Preference
            android:key="passwordPref"
            android:title="Change Password" />
        <Preference
            android:key="privacyPref"
            android:title="Privacy Settings" />
    </PreferenceScreen>

    <Preference
        android:key="notificationPref"
        android:title="Notification Settings" />
    <Preference
        android:key="socialPref"
        android:summary="Facebook, Foursquare, Twitter"
        android:title="Social Connect" />

    <PreferenceCategory android:title="Device Settings" >
        <CheckBoxPreference
            android:defaultValue="true"
            android:key="pushPref"
            android:summary="Show on status bar when new notifications are recieved"
            android:title="Push Notifications" />
        <CheckBoxPreference
            android:defaultValue="true"
            android:dependency="pushPref"
            android:key="vibratePref"
            android:summary="Vibrate on incoming notifications"
            android:title="Vibrate" />
        <CheckBoxPreference
            android:defaultValue="true"
            android:dependency="pushPref"
            android:key="lightPref"
            android:summary="Pulse light for notification"
            android:title="Notification Light" />
    </PreferenceCategory>
    <PreferenceCategory android:title="Friends" >
        <Preference
            android:key="addFriendsPref"
            android:summary="Find friends on Bakasura"
            android:title="Add friends" />
        <Preference
            android:key="friendReqPref"
            android:summary="Approve pending friend requests"
            android:title="Friend  Requests" />
    </PreferenceCategory>
    <PreferenceCategory android:title="Troubleshooting" >
        <Preference
            android:key="helpPref"
            android:summary="Get help using Bakasura!"
            android:title="Help" />
        <Preference
            android:key="reportPref"
            android:summary="Send a force-close report by email"
            android:title="Send report" />
        <Preference
            android:key="cachePref"
            android:summary="sdfas"
            android:title="asdsa" />
    </PreferenceCategory>
    <PreferenceCategory android:title="About" >
        <PreferenceScreen
            android:key="aboutPrefScreen"
            android:summary="About, Terms of Service, Privacy Policy"
            android:title="About" >
            <Preference
                android:key="versionPref"
                android:summary="sadsa"
                android:title="Version" />

            <PreferenceCategory android:title="Legal" >
                <Preference
                    android:key="tosPref"
                    android:title="Terms of Service" />
                <Preference
                    android:key="privacyPolicyPref"
                    android:title="Privacy Policy" />
            </PreferenceCategory>
        </PreferenceScreen>
    </PreferenceCategory>
</PreferenceScreen>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T00:05:33+00:00Added an answer on June 17, 2026 at 12:05 am

    Clean the project and try again, otherwise try

    import package.name.R
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to create a new Dedicated Cache Role in Windows Azure but get the
I am getting the following error when trying to create a shared preferences file
Trying to create a black line in my view to separate text blocks but
I am trying to create three drop down menus (a list of activity choices),
I am trying to create an app with some menus, an I am following
concerning android development, I'm simply trying to create an SQL database when the activity
I am trying to create a dialog preference as follows <DialogPreference android:key=cachePref android:dialogMessage=Testing message
I'm trying to create an endgame activity for my Hangman game for android and
I am trying to create a custom title layout but I'd still want to
i've been trying to create a map-related android app, but i realized that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.