【问题标题】:Error:The prefix "xmlns" cannot be bound to any namespace explicitly to android studio错误:前缀“xmlns”不能明确绑定到任何命名空间到android studio
【发布时间】:2015-10-06 04:50:16
【问题描述】:

将 Eclipse 代码导入 Android Studio 时出现以下错误。 我不明白为什么会这样 我已经通过检查 XMLNS 和其他自定义标签尝试了可能的解决方案。

【问题讨论】:

标签: android eclipse android-studio android-studio-import


【解决方案1】:

删除 ma​​in\res\values\style.xml 中的所有 xmlns:android="http://schemas.android.com/apk/res/android" > 来自 style 标签的文件。 这是示例代码:

<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>

应该是这样的:

<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>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-11-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多