我试图为android live墙纸运行一些教程示例,但始终收到此错误
09-28 16:13:30.729: E/AndroidRuntime(408): java.lang.RuntimeException:
Unable to instantiate service
net.markguerra.android.glwallpaperexample.MyWallpaperService:
java.lang.ClassNotFoundException:
net.markguerra.android.glwallpaperexample.MyWallpaperService in loader
dalvik.system.PathClassLoader[/data/app/net.markguerra.android.glwallpaperexample-1.apk]
这是我的清单文件
package="net.markguerra.android.glwallpaperexample"
android:versionCode="1"
android:versionName="1.0">
android:permission="android.permission.BIND_WALLPAPER">
android:resource="@xml/myglwallpaper" />
我创建的壁纸服务
package net.markguerra.android.glwallpaperexample;
import net.rbgrn.android.glwallpaperservice.*;
// Original code provided by Robert Green
// http://www.rbgrn.net/content/354-glsurfaceview-adapted-3d-live-wallpapers
public class MyWallpaperService extends GLWallpaperService {
public MyWallpaperService() {
super();
}
public Engine onCreateEngine() {
MyEngine engine = new MyEngine();
return engine;
}
class MyEngine extends GLEngine {
MyRenderer renderer;
public MyEngine() {
super();
// handle prefs, other initialization
renderer = new MyRenderer();
setRenderer(renderer);
setRenderMode(RENDERMODE_CONTINUOUSLY);
}
public void onDestroy() {
super.onDestroy();
if (renderer != null) {
renderer.release();
}
renderer = null;
}
}
}
这是我的项目结构
我无法弄清楚其中出了什么问题,这是什么错误?
任何建议对我都会有很大的帮助
在堆栈上发现了一些相关问题,但与动态壁纸无关