alibaba / alibaba/AndFix

AS使用0.5.0@aar版本加载.apatch后crash

Open
#285 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
7k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

java.lang.IllegalAccessError: Method 'void android.support.v4.app.FragmentActivity.onCreate(android.os.Bundle)' is inaccessible to class 'com.android.ctrip.gs.ui.hotfix.TestHotfix_CF' (declaration of 'com.android.ctrip.gs.ui.hotfix.TestHotfix_CF' appears in /data/data/com.android.ctrip.gs/files/apatch/test.apatch)
E/AndroidRuntime(18837): at com.android.ctrip.gs.ui.hotfix.TestHotfix_CF.onCreate(TestHotfix.java:24)
E/AndroidRuntime(18837): at android.app.Activity.performCreate(Activity.java:6144)
E/AndroidRuntime(18837): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1115)
E/AndroidRuntime(18837): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2528)
E/AndroidRuntime(18837): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2656)
E/AndroidRuntime(18837): at android.app.ActivityThread.access$800(ActivityThread.java:178)
E/AndroidRuntime(18837): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1512)
E/AndroidRuntime(18837): at android.os.Handler.dispatchMessage(Handler.java:111)
E/AndroidRuntime(18837): at android.os.Looper.loop(Looper.java:194)
E/AndroidRuntime(18837): at android.app.ActivityThread.main(ActivityThread.java:5692)
E/AndroidRuntime(18837): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(18837): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(18837): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
E/AndroidRuntime(18837): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)

如题所示,但是我用0.4.0@aar就是好的,想知道这是怎么回事?我该选择哪个版本?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the crash with the 0.5.0 and 0.4.0 AARs, using the stack trace entry at TestHotfix.java:24 as the initial point of investigation. Compare how each version loads test.apatch and handles the android.support.v4.app.FragmentActivity.onCreate call; done means identifying the version-specific cause and documenting which version works with this setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.