我从here下载了一个GLWallpaper的例子。 我按照自述文件所述导入项目。 但是,我得到了“未找到类”异常。android class path exception
04-09 22:24:06.281: E/AndroidRuntime(31990): 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[/mnt/asec/net.markguerra.android.glwallpaperexample-1/pkg.apk]
我现在没有什么问题了。清单xml已经有“MyWallpaperService”。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.markguerra.android.glwallpaperexample"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<service android:label="@string/service_label" android:name=".MyWallpaperService"
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="@xml/myglwallpaper" />
</service>
</application>
<uses-sdk android:minSdkVersion="7" />
我没有改变从示例代码什么。 这里是“MyWallpaperService”类的一部分。
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();
}
显示您的清单文件 – Abhi 2012-04-09 14:48:44
添加清单 – user1297295 2012-04-09 14:56:41