java.lang.RuntimeException: Unable to instantiate

2019-07-16 02:20发布

Error log after installing and running the live wallpaper Basically, I get the error on live wallpaper app. It crashes when I'm setting the wallpaper. What's the problem?

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

My manifest:

<?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>

AGAIN: Basically, I get the error on live wallpaper app. It crashes when I'm setting the wallpaper. What's the problem?

0条回答
登录 后发表回答