moralkill
moralkill

Reputation: 97

Have some troubles vith xml file. Android. Eclipse. error: Invalid start tag PreferenceScreen

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

Answers (2)

Vivek Elangovan
Vivek Elangovan

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

02Anant
02Anant

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

Related Questions