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 794653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:20:52+00:00 2026-05-14T22:20:52+00:00

I have created an account type using the AccountAuthenticator stuff as done in the

  • 0

I have created an account type using the AccountAuthenticator stuff as done in the SampleSyncAdapter tutorial. I am now trying to get account preferences working.

I have added the line android:accountPreferences="@xml/account_preferences" to my account-authenticator and account_preferences.xml looks like so:

<?xml version="1.0" encoding="utf-8"?>

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="@string/alum_settings_title"/>

<CheckBoxPreference
    android:key="sync_alum"
    android:title="@string/sync_alum"
    android:summaryOn="@string/sync_alum_check"
    android:summaryOff="@string/sync_alum_nocheck"/>

<ListPreference
    android:key="sync_alum_since"
    android:title="@string/alum_years"
    android:entries="@array/years"
    android:entryValues="@array/years"
    android:dependency="sync_alum"/>
</PreferenceScreen>

The checkbox preference works exactly like it should but the ListPreference crashes the entire system with the following message:

05-14 22:32:16.794: ERROR/AndroidRuntime(63): android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application

I get the same error with EditTextPreference and with the custom subclass of DialogPreference I created.

  • 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-05-14T22:20:52+00:00Added an answer on May 14, 2026 at 10:20 pm

    For grins, try nuking your PreferenceCategory. It’s not doing you much good as-is anyway, since it’s not wrapping any preferences. I doubt this is your problem, but it’s the only thing odd I see with the XML.

    Otherwise, that exception screans “Android bug” to me, so if you can create a project that reproduces the error, post it and this info to http://b.android.com.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a test account with Authorize.net and am using ActiveMerchant to process
i have created a pay now button using paypal button generator. The button has
I have created login account on my localhost\sql2008 Server (Eg. User123) Mapped to Database
I have created a method that should ideally take a single Account object and
I have the following table <thead> <tr> <th>Account ID</th> <th>Code</th> <th>Date Created</th> <th>Date Expires</th>
I have a CakePHP application where I am trying to get a count of
I am trying to create a small server type application and have a question
I am working on a project in which i have created an app on
I have created a WCF WebHttp Service using the following article as a guideline..
Here's the issue. I'm using ASP.NET Forms Authentication for an account balance type website.

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.