Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 855
Kirtikumar A. Avatar asked Dec 04 '25 18:12

Kirtikumar A.


1 Answers

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>
like image 140
0xAliHn Avatar answered Dec 06 '25 09:12

0xAliHn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!