java - 我在 dalvik.system.PathClassLoader.findClass 中的启动器主题 java.lang.ClassNotFoundException 上不断收到此错误

标签 java android

下面是开发者控制台的实际错误。 我的启动器主题有一个应用程序,因此用户可以应用主题、联系我等...

    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{bigdx.golauncher.serenity.red/bigdx.golauncher.serenity.red}: java.lang.ClassNotFoundException: bigdx.golauncher.serenity.red in loader dalvik.system.PathClassLoader[/data/app/bigdx.golauncher.serenity.red-1.apk]
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1624)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1722)
    at android.app.ActivityThread.access$1500(ActivityThread.java:124)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:974)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:3821)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.lang.ClassNotFoundException: bigdx.golauncher.serenity.red in         loader dalvik.system.PathClassLoader[/data/app/bigdx.golauncher.serenity.red-1.apk]
    at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1616)
    ... 11 more

这是我的应用程序的 Android list 。第一次发帖的时候忘了添加

<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="11" android:versionName="4.4"     package="bigdx.golauncher.serenity.red"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="7" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<uses-permission android:name="android.permission.SET_WALLPAPER_HINTS" />
<application android:theme="@android:style/Theme.NoTitleBar" android:label="@string/theme_title" android:icon="@drawable/theme_icon">
    <activity android:label="@string/app_name" android:name=".HelperActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="com.anddoes.launcher.THEME" />
        </intent-filter>
    </activity>
    <activity android:label="@string/theme_title" android:name=".Icons" />
    <activity android:label="@string/wp_theme_title" android:icon="@drawable/wallpaper_icon2" android:name=".Wallpaper" android:screenOrientation="nosensor" android:finishOnCloseSystemDialogs="true">
        <intent-filter>
            <action android:name="android.intent.action.SET_WALLPAPER" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity android:label="@string/theme_title" android:icon="@drawable/theme_icon" android:name=".Docks">
        <intent-filter>
            <action android:name="android.intent.action.PICK" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="image/*" />
        </intent-filter>
    </activity>
    <activity android:label="@string/theme_title" android:icon="@drawable/theme_icon" android:name="bigdx.golauncher.serenity.red.GoLauncher">
        <intent-filter>
            <action android:name="com.gau.go.launcherex.theme" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <action android:name="com.gau.go.launcherex.theme.gowidget" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <provider android:name="bigdx.golauncher.serenity.red.DocksProvider" android:authorities="bigdx.golauncher.serenity.red.DocksProvider" />
    <receiver android:label="@string/analog_gadget" android:icon="@drawable/ic_widget_analog_clock" android:name="bigdx.golauncher.serenity.red.AnalogClockWidget">
        <intent-filter>
            <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
        </intent-filter>
        <meta-data android:name="android.appwidget.oldName" android:value="com.android.deskclock.AnalogAppWidgetProvider" />
        <meta-data android:name="android.appwidget.provider" android:resource="@xml/analog_appwidget" />
    </receiver>
</application>
</manifest>

最佳答案

问题是“HelperActivity”被允许将组件设置为 0,当用户尝试从市场或应用程序抽屉打开应用程序时,它将导致应用程序出错。在帮助程序 Activity 中,APEX Intent 还包括当“HelperActivity” Activity 不再可访问时删除 Apex 兼容性。

此主题现已得到答复。

要获得更合适的替代方案,您可能需要使用未启用“KILL_APP”标志的 SET_COMPONENT_ENABLED 标志,但那是另一种情况。

关于java - 我在 dalvik.system.PathClassLoader.findClass 中的启动器主题 java.lang.ClassNotFoundException 上不断收到此错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12801858/

相关文章:

java - 使用客户信息生成唯一 ID

android - 使用谷歌地图 flutter 单击按钮时如何激活位置?

android - 无法在服务 onStart() 中检索 Intent Extras

android - 如何使用它们的经度和纬度值计算两个位置之间的距离

java - 将 json 对象解码为字符串 android

java - 我应该如何将功能划分为 Java 类?

java - Android 媒体播放器无法播放音频文件

android - Content Observer 的 onChange 方法被多次触发

java - ELKI获取聚类数据点

java - 为什么 java lambda 表达式不引入新级别的作用域?