java.lang.RuntimeException:无法实例化服务

时间:2012-11-18 11:52:35

标签: java android service runtime instantiation

安装并运行动态壁纸后的错误日志 基本上,我得到了动态壁纸应用程序的错误。当我设置壁纸时它会崩溃。有什么问题?

com.snailreactors.thestorm.SBLiveWallpaper: java.lang.ClassNotFoundException: com.snailreactors.thestorm.SBLiveWallpaper
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2347)
at android.app.ActivityThread.access$1600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.snailreactors.thestorm.SBLiveWallpaper
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2344)
... 10 more

我的清单:

<?xml version="1.0" encoding="utf-8"?>

<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.snailreactors.thestorm" android:versionCode="3" 
            android:versionName="1.15">
            <uses-sdk android:minSdkVersion="3" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.RECEIVE_SMS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-feature android:name="android.software.live_wallpaper" />   


    <application
        android:label="@string/application_name"
        android:icon="@drawable/icon">

        <service
            android:label="@string/service_name"   
            android:name=".SBLiveWallpaper"
            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/lwp_resource" />
        </service>

        <activity
            android:label="Settings"
            android:name=".LiveWallpaperSettings"
            android:theme="@android:style/Theme.WallpaperSettings"
            android:exported="true">
        </activity>

    </application>
    <supports-screens 
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true" />
</manifest>

再次:基本上,我在动态壁纸应用程序上收到错误。当我设置壁纸时它会崩溃。有什么问题?

0 个答案:

没有答案