【问题标题】:Issue with creating new xml files创建新xml文件的问题
【发布时间】:2010-10-02 14:13:41
【问题描述】:

我正在尝试在 /res/drawable 中创建一个新的 xml 文件(在 eclipse 中为 android 开发)

我得到的信息是;

在此找到多个注释 线: - 文件过早结束。 - 错误:解析 XML 时出错:找不到元素

当我在正确的文件夹中时,我按 New>File,然后我将其命名为 ic_tab_artists.xml,然后在我收到消息后立即 ^

那么,我做错了什么?

【问题讨论】:

    标签: android eclipse htc-android


    【解决方案1】:

    尝试在文件中添加一些有意义的内容。例如:

    <?xml version="1.0" encoding="utf-8"?>
    <selector xmlns:android="http://schemas.android.com/apk/res/android"
        android:dither="true">
    
        <item 
            android:state_window_focused="false"
            android:drawable="@android:color/transparent" />    
    </selector>
    

    【讨论】:

      猜你喜欢
      • 2016-07-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多