我正在尝试在 /res/drawable
中创建一个新的 xml 文件(在 eclipse 中为 android 开发)
我得到的消息是;
Multiple annotations found at this line: - Premature end of file. - error: Error parsing XML: no element found
当我在正确的文件夹中时,我按 New>File ,然后我将其命名为 ic_tab_artists.xml
,在我收到消息后立即 ^
那么,我做错了什么?
最佳答案
尝试在文件中添加一些有意义的内容。例如:
<?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>
关于android - 创建新 xml 文件的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3846093/