在ViewGroup.java中更改Android源代码

时间:2017-01-29 22:56:32

标签: java android android-source

我想在ViewGroup.java中的一个函数中进行一些更改。我已经编译了源代码,所以我只用命令

来填充我最后改变的部分
make framework

但是当我启动模拟器时,它会因错误而崩溃

--------- beginning of crash
01-29 22:22:30.570   280   280 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: main
01-29 22:22:30.570   280   280 E AndroidRuntime: java.lang.RuntimeException: Missing class when invoking static main com.android.server.SystemServer
01-29 22:22:30.570   280   280 E AndroidRuntime:    at com.android.internal.os.RuntimeInit.invokeStaticMain(RuntimeInit.java:205)
01-29 22:22:30.570   280   280 E AndroidRuntime:    at com.android.internal.os.RuntimeInit.applicationInit(RuntimeInit.java:326)
01-29 22:22:30.570   280   280 E AndroidRuntime:    at com.android.internal.os.RuntimeInit.zygoteInit(RuntimeInit.java:278)
01-29 22:22:30.570   280   280 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.handleSystemServerProcess(ZygoteInit.java:458)
01-29 22:22:30.570   280   280 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.startSystemServer(ZygoteInit.java:545)
01-29 22:22:30.570   280   280 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
01-29 22:22:30.570   280   280 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: com.android.server.SystemServer
01-29 22:22:30.570   280   280 E AndroidRuntime:    at java.lang.Class.classForName(Native Method)
01-29 22:22:30.570   280   280 E AndroidRuntime:    at java.lang.Class.forName(Class.java:324)
01-29 22:22:30.570   280   280 E AndroidRuntime:    at com.android.internal.os.RuntimeInit.invokeStaticMain(RuntimeInit.java:203)
01-29 22:22:30.570   280   280 E AndroidRuntime:    ... 5 more
01-29 22:22:30.570   280   280 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.server.SystemServer" on path: DexPathList[[zip file "/system/framework/services.jar", zip file "/system/framework/ethernet-service.jar", zip file "/system/framework/wifi-service.jar"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
01-29 22:22:30.570   280   280 E AndroidRuntime:    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
01-29 22:22:30.570   280   280 E AndroidRuntime:    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
01-29 22:22:30.570   280   280 E AndroidRuntime:    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
01-29 22:22:30.570   280   280 E AndroidRuntime:    ... 8 more
01-29 22:22:30.570   280   280 E AndroidRuntime:    Suppressed: java.io.IOException: No original dex files found for dex location /system/framework/services.jar
01-29 22:22:30.570   280   280 E AndroidRuntime:        at dalvik.system.DexFile.openDexFileNative(Native Method)
01-29 22:22:30.570   280   280 E AndroidRuntime:        at dalvik.system.DexFile.openDexFile(DexFile.java:295)
01-29 22:22:30.570   280   280 E AndroidRuntime:        at dalvik.system.DexFile.<init>(DexFile.java:80)
01-29 22:22:30.570   280   280 E AndroidRuntime:        at dalvik.system.DexFile.<init>(DexFile.java:59)
01-29 22:22:30.570   280   280 E AndroidRuntime:        at dalvik.system.DexPathList.loadDexFile(DexPathList.java:279)
01-29 22:22:30.570   280   280 E AndroidRuntime:        at dalvik.system.DexPathList.makePathElements(DexPathList.java:248)
01-29 22:22:30.570   280   280 E AndroidRuntime:        at dalvik.system.DexPathList.<init>(DexPathList.java:120)
01-29 22:22:30.570   280   280 E AndroidRuntime:        at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48)
01-29 22:22:30.570   280   280 E AndroidRuntime:        at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:38)
01-29 22:22:30.570   280   280 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.handleSystemServerProcess(ZygoteInit.java:451)

这是否意味着我无法更改此文件?有没有办法做到这一点? 感谢

0 个答案:

没有答案