Android坚持在我的标签中需要layout_width和layout_height。我很确定他们不是读这里的。我想弄清楚这是因为我的错误还是一个奇怪的Android怪癖。
我的布局文件:
<?xml version="1.0" encoding="utf-8"?>
<wallpaper xmlns:android="http://schemas.android.com/apk/res/android"
android:thumbnail="@drawable/icon"
android:description="@strings/description"/> 我的名单上的一个片段:
<service android:name="com.handmade.tavern.LiveWallpaper"
android:label="@string/app_name"
android:permission="android.permission.BIND_WALLPAPER">
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService"/>
</intent-filter>
<meta-data android:name="android.service.wallpaper"
android:resource="@layout/wallpaper_layout"/>
</service>还有其他人经历过吗?有人能解释我的错误吗?谢谢,
发布于 2014-03-25 22:35:53
好的,Android似乎只允许res/xml目录中的标记。只需移动文件就可以解决问题。我不确定Android是否挑剔。我以前见过两次对壁纸的引用,它们都存储在res/layout文件夹中,但我不知道它们是否是排版。欢迎进一步评论。
https://stackoverflow.com/questions/22626724
复制相似问题