SampleSyncAdapter
자습서에서와 같이 AccountAuthenticator 항목을 사용하여 계정 유형을 만들었습니다. 나는 현재 계정 환경 설정 작업을 시도하고있다. 체크 박스 환경 설정이 정상적으로 똑같이 작동하지만 ListPreference는 다음과 같은 메시지가 전체 시스템을 충돌ListPreference에서 계정 환경 설정이 충돌 함
<?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>
:과 같이
내가 내account-authenticator
및 account_preferences.xml에 선
android:accountPreferences="@xml/account_preferences"
을 추가 한
보인다
05-14 22:32:16.794: ERROR/AndroidRuntime(63): android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
EditTextPreference와 내가 만든 DialogPreference의 사용자 정의 하위 클래스에서 동일한 오류가 발생합니다.
추 신. 다음은 전체 스택 추적입니다. 가독성을 유지하기 위해 원래 게시물에 넣지 않았습니다. http://gist.github.com/raw/401785/73141d95ebddab0fc67b6219c38701c8d3ac7051/gistfile1.txt – Sionide21