修改android 自带的class中的方法, 比如我是在Activity的onCreate中随便加一个依据打印.验证就出了这个问题
- Dominant language
- C++
- Stars
- 7k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
ava.lang.NoSuchMethodError: No virtual method getPackageName()Ljava/lang/String; in class Landroid/app/Activity_CF; or its super classes (declaration of 'android.app.Activity_CF' appears in /data/user/0/com.vivo.hotfixdemo/files/apatch/framework.apatch)
at android.app.Activity_CF.decideSpecialActivity(Activity.java:6915)
at android.app.Activity_CF.onCreate(Activity.java:953)
at android.support.v4.app.BaseFragmentActivityGingerbread.onCreate(BaseFragmentActivityGingerbread.java:51)
at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:317)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:85)
at android.app.Activity.performCreate(Activity.java:6403)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1114)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2470)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2577)
at android.app.ActivityThread.access$1000(ActivityThread.java:169)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1414)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5646)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:851)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:741)
Contributor guide
No contributing guide indexed for this repository
Research direction
Begin with the failing call at android.app.Activity_CF.decideSpecialActivity(Activity.java:6915) and the generated framework.apatch named in the trace; compare that class's available methods with the runtime call path from onCreate. Reproduce the Activity.onCreate verification case, with completion marked by the reported NoSuchMethodError no longer occurring.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, 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