jasonross / Nuwa

Nuwa, pure java implementation, can hotfix your android application.
2.96k stars 575 forks source link

运行报错,我重新写了一下Hello.java的方法,把class文件打包后就报错了 #15

Closed rjliulei closed 8 years ago

rjliulei commented 8 years ago

11-19 15:45:27.404: E/AndroidRuntime(3459): FATAL EXCEPTION: main 11-19 15:45:27.404: E/AndroidRuntime(3459): java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation 11-19 15:45:27.404: E/AndroidRuntime(3459): at cn.jiajixin.nuwasample.MainActivity.onCreate(MainActivity.java:15) 11-19 15:45:27.404: E/AndroidRuntime(3459): at android.app.Activity.performCreate(Activity.java:5122) 11-19 15:45:27.404: E/AndroidRuntime(3459): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1151) 11-19 15:45:27.404: E/AndroidRuntime(3459): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2322) 11-19 15:45:27.404: E/AndroidRuntime(3459): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2410) 11-19 15:45:27.404: E/AndroidRuntime(3459): at android.app.ActivityThread.access$600(ActivityThread.java:169) 11-19 15:45:27.404: E/AndroidRuntime(3459): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380) 11-19 15:45:27.404: E/AndroidRuntime(3459): at android.os.Handler.dispatchMessage(Handler.java:107) 11-19 15:45:27.404: E/AndroidRuntime(3459): at android.os.Looper.loop(Looper.java:194) 11-19 15:45:27.404: E/AndroidRuntime(3459): at android.app.ActivityThread.main(ActivityThread.java:5463) 11-19 15:45:27.404: E/AndroidRuntime(3459): at java.lang.reflect.Method.invokeNative(Native Method) 11-19 15:45:27.404: E/AndroidRuntime(3459): at java.lang.reflect.Method.invoke(Method.java:525) 11-19 15:45:27.404: E/AndroidRuntime(3459): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:854) 11-19 15:45:27.404: E/AndroidRuntime(3459): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:621) 11-19 15:45:27.404: E/AndroidRuntime(3459): at dalvik.system.NativeStart.main(Native Method)

jasonross commented 8 years ago

@rjliulei 就这点信息,我没法诊断啊

rjliulei commented 8 years ago

额,就是Hello.java里的say方法我修改了返回值。把新的hello.java打包到patch.jar后,运行出上面的错

rjliulei commented 8 years ago

Hack.java是在什么地方引用的?项目里没有引用它啊?

jasonross commented 8 years ago

@rjliulei 你是按照run the sample来的吗?

rjliulei commented 8 years ago

不是,我是在eclipse里搞的

jasonross commented 8 years ago

@rjliulei 不兼容eclipse

rjliulei commented 8 years ago

。。。为毛?Hack.java是在什么地方引用的?项目里没有引用它啊?

jasonross commented 8 years ago

@rjliulei 我的另一个项目,NuwaGradle