7.0 下面 static method crash
- Dominant language
- C++
- Stars
- 7k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
同样的程序补丁6.0正常,7.0不行,报如下错误:
1-03 15:13:10.152 22329 22329 E AndroidRuntime: FATAL EXCEPTION: main
01-03 15:13:10.152 22329 22329 E AndroidRuntime: Process: me.yifeiyuan.andfixdemo, PID: 22329
01-03 15:13:10.152 22329 22329 E AndroidRuntime: java.lang.IllegalStateException: Could not execute method for android:onClick
01-03 15:13:10.152 22329 22329 E AndroidRuntime: at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:293)
01-03 15:13:10.152 22329 22329 E AndroidRuntime: at android.view.View.performClick(View.java:5637)
01-03 15:13:10.152 22329 22329 E AndroidRuntime: at android.view.View$PerformClick.run(View.java:22433)
01-03 15:13:10.152 22329 22329 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:751)
01-03 15:13:10.152 22329 22329 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
01-03 15:13:10.152 22329 22329 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
01-03 15:13:10.152 22329 22329 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6126)
01-03 15:13:10.152 22329 22329 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-03 15:13:10.152 22329 22329 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
01-03 15:13:10.152 22329 22329 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
01-03 15:13:10.152 22329 22329 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException
01-03 15:13:10.152 22329 22329 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-03 15:13:10.152 22329 22329 E AndroidRuntime: at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:288)
01-03 15:13:10.152 22329 22329 E AndroidRuntime: ... 9 more
01-03 15:13:10.152 22329 22329 E AndroidRuntime: Caused by: java.lang.NoSuchMethodError: No static method test()V in class Lme/yifeiyuan/andfixdemo/MainActivity; or its super classes (declaration of 'me.yifeiyuan.andfixdemo.MainActivity' appears in /data/app/me.yifeiyuan.andfixdemo-1/base.apk)
01-03 15:13:10.152 22329 22329 E AndroidRuntime: at me.yifeiyuan.andfixdemo.MainActivity.onClick(MainActivity.java:197)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the crash from the Android app at MainActivity.java line 197, where onClick calls the missing static test() method. Compare the same program under patch versions 6.0 and 7.0 and determine what changed; done means the click no longer raises NoSuchMethodError on 7.0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100