java.lang.RuntimeException: Unable to instantiate service

假装没事ソ 提交于 2020-01-04 12:24:33

问题


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?

来源:https://stackoverflow.com/questions/13439842/java-lang-runtimeexception-unable-to-instantiate-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!