2011-06-14 37 views
0

我正在开发android的动态壁纸。创建android动态壁纸时出错 - “壁纸服务无法解析类型”

我收到错误“Wallpaperservice无法解析类型”,所以它好像我需要导入一些相同的包。

我导入了包android.app.Service包,但eclipse显示包不可用。

那么,我需要手动下载这个软件包还是其他任何东西。 请指导。

+0

如果您发布了一些我们可以查看的代码,它可能会有所帮助。 – easycheese 2011-06-14 05:34:27

+0

我使用的教程中提供的代码相同, http://developer.android.com/resources/samples/CubeLiveWallpaper/src/com/example/android/livecubes/cube1/CubeWallpaper1.html – Gaurang 2011-06-14 07:27:58

+0

而您的API级别为7? Min SDK是2.1? – easycheese 2011-06-14 08:25:58

回答

0

你需要

import android.service.wallpaper.WallpaperService; 

但是,也许你的问题是你的构建目标?您需要指定API 7(Android 2.1)或更高版本。

+0

是的,这是清单文件中的构建目标的问题,现在已解决。 非常感谢大家的帮助! – Gaurang 2011-06-15 03:33:46