集成Xposed时的Android设置java.lang.ExceptionInInitializerError

时间:2014-07-28 21:17:26

标签: java android xml settings

我已经在Android ROM上工作了大约一个月,我的目标之一是将Xposed框架集成到股票设置应用程序中。我在设置中构建并制作了布局,但出于某种原因,如果我点击任何一个菜单,我总会得到一个强制关闭。 logcat如下。

    D/SubSettings( 1570): Launching fragment com.android.settings.xposed.Framework
    W/dalvikvm( 1570): Exception Ljava/lang/NullPointerException; thrown while initializing Lcom/android/settings/xposed/util/AssetUtil;
    D/AndroidRuntime( 1570): Shutting down VM
    W/dalvikvm( 1570): threadid=1: thread exiting with uncaught exception (group=0x4157ace0)
    E/AndroidRuntime( 1570): FATAL EXCEPTION: main
    E/AndroidRuntime( 1570): Process: com.android.settings, PID: 1570
    E/AndroidRuntime( 1570): java.lang.ExceptionInInitializerError
    E/AndroidRuntime( 1570):    at com.android.settings.xposed.Framework.<init>(Framework.java:44)
    E/AndroidRuntime( 1570):    at java.lang.Class.newInstanceImpl(Native Method)
    E/AndroidRuntime( 1570):    at java.lang.Class.newInstance(Class.java:1208)
    E/AndroidRuntime( 1570):    at android.app.Fragment.instantiate(Fragment.java:590)
    E/AndroidRuntime( 1570):    at android.preference.PreferenceActivity.switchToHeaderInner(PreferenceActivity.java:1183)
    E/AndroidRuntime( 1570):    at android.preference.PreferenceActivity.switchToHeader(PreferenceActivity.java:1199)
    E/AndroidRuntime( 1570):    at android.preference.PreferenceActivity.onCreate(PreferenceActivity.java:545)
    E/AndroidRuntime( 1570):    at com.android.settings.Settings.onCreate(Settings.java:213)
    E/AndroidRuntime( 1570):    at android.app.Activity.performCreate(Activity.java:5312)
    E/AndroidRuntime( 1570):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
    E/AndroidRuntime( 1570):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2181)
    E/AndroidRuntime( 1570):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2276)
    E/AndroidRuntime( 1570):    at android.app.ActivityThread.access$800(ActivityThread.java:144)
    E/AndroidRuntime( 1570):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
    E/AndroidRuntime( 1570):    at android.os.Handler.dispatchMessage(Handler.java:102)
    E/AndroidRuntime( 1570):    at android.os.Looper.loop(Looper.java:136)
    E/AndroidRuntime( 1570):    at android.app.ActivityThread.main(ActivityThread.java:5146)
    E/AndroidRuntime( 1570):    at java.lang.reflect.Method.invokeNative(Native Method)
    E/AndroidRuntime( 1570):    at java.lang.reflect.Method.invoke(Method.java:515)
    E/AndroidRuntime( 1570):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
    E/AndroidRuntime( 1570):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
    E/AndroidRuntime( 1570):    at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
    E/AndroidRuntime( 1570):    at dalvik.system.NativeStart.main(Native Method)
    E/AndroidRuntime( 1570): Caused by: java.lang.NullPointerException
    E/AndroidRuntime( 1570):    at com.android.settings.xposed.util.AssetUtil.<clinit>(AssetUtil.java:18)
    E/AndroidRuntime( 1570):    ... 23 more
    W/ActivityManager(  801):   Force finishing activity com.android.settings/.SubSettings
    W/ActivityManager(  801):   Force finishing activity com.android.settings/.SubSettings

我查看了第44行的Framework.java和第18行的AssetUtil.java,但仍然无法找出错误。更有趣的是de.robv.android.xposed.XposedBridge.java甚至不存在。

我的来源是:https://github.com/Primed/android_packages_apps_Settings

感谢任何帮助,谢谢!

0 个答案:

没有答案