Kirtikumar A.
Kirtikumar A.

Reputation: 4204

Error:The prefix "xmlns" cannot be bound to any namespace explicitly to android studio

I am getting below error while importing the eclipse code to Android studio. I am not getting why this is happening I have already tried for possible solutions by checking XMLNS and other custom tags.

This is file where it navigates for error -  this is auto-generated file

This is error I'm getting

Upvotes: 3

Views: 1383

Answers (1)

0xAliHn
0xAliHn

Reputation: 19240

Remove all xmlns:android="http://schemas.android.com/apk/res/android" in your main\res\values\style.xml file from style tag. Here is is the sample code:

<resources xmlns:android="http://schemas.android.com/apk/res/android">
    <style name="AppBaseTheme" parent="android:Theme.Light">
    </style>
    <style name="AppTheme" parent="AppBaseTheme">
    </style>

    <style xmlns:android="http://schemas.android.com/apk/res/android" name="RadioButton" parent="@android:style/Widget.CompoundButton">
        <item name="android:button">@null</item>
        <item name="android:padding">5dp</item>
    </style>

    <style xmlns:android="http://schemas.android.com/apk/res/android" name="EditText" parent="@android:style/Widget.EditText">
        <item name="android:textSize">15sp</item>
    </style>
</resources>

It should be like this:

<resources xmlns:android="http://schemas.android.com/apk/res/android">
    <style name="AppBaseTheme" parent="android:Theme.Light">
    </style>
    <style name="AppTheme" parent="AppBaseTheme">
    </style>

    <style name="RadioButton" parent="@android:style/Widget.CompoundButton">
        <item name="android:button">@null</item>
        <item name="android:padding">5dp</item>
    </style>

    <style name="EditText" parent="@android:style/Widget.EditText">
        <item name="android:textSize">15sp</item>
    </style>
</resources>

Upvotes: 2

Related Questions