Reputation: 97
Have some troubles vith xml file. Android. Eclipse. Help please) Error: error: Invalid start tag PreferenceScreen
Error notification on second line
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="Работа с файлами">
<CheckBoxPreference
android:key="@string/pref_openmode"
android:title="Открыть файл"
android:summary="Открывать файл при запуске приложения" />
</PreferenceCategory>
(its only a little bit part...)
Upvotes: 5
Views: 1908
Reputation: 248
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="Работа с файлами">
<CheckBoxPreference
android:key="@string/pref_openmode"
android:title="Открыть файл"
android:summary="Открывать файл при запуске приложения" />
</PreferenceCategory>
</PreferenceScreen>
The above is correct u should place this xml file in the values which is under res folder.
Upvotes: 0
Reputation: 318
I think that you have your file in the wrong directory.
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="Работа с файлами">
<CheckBoxPreference
android:key="@string/pref_openmode"
android:title="Открыть файл"
android:summary="Открывать файл при запуске приложения" />
</PreferenceCategory>
</PreferenceScreen>
Upvotes: 1