生成patch报错
- Dominant language
- C++
- Stars
- 7k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
只修改2行代码(不涉及资源文件),却发现如下改动,未能生成patch包:
add modified Method:Landroid/graphics/drawable/Drawable; newDrawable() in Class:Landroid/support/a/a/b$a;
add modified Method:Landroid/graphics/drawable/Drawable; newDrawable(Landroid/content/res/Resources;)
in Class:Landroid/support/a/a/b$a;
add modified Method:V inflate(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;
Landroid/util/AttributeSet;Landroid/content/res/Resources$Theme;)
in Class:Landroid/support/a/a/b;
add modified Method:Z isAutoMirrored() in Class:Landroid/support/a/a/b;
add modified Method:V setAutoMirrored(Z) in Class:Landroid/support/a/a/b;
add modified Method:V a(Landroid/graphics/Path;DDDDDDDDD) in Class:Landroid/support/a/a/d$b;
add modified Method:Landroid/support/a/a/g; a(Landroid/content/res/Resources;
ILandroid/content/res/Resources$Theme;) in Class:Landroid/support/a/a/g;
add modified Method:Z a() in Class:Landroid/support/a/a/g;
add modified Method:V b(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;
Landroid/util/AttributeSet;Landroid/content/res/Resources$Theme;)
in Class:Landroid/support/a/a/g;
add modified Method:Z isAutoMirrored() in Class:Landroid/support/a/a/g;
add modified Method:V setAutoMirrored(Z) in Class:Landroid/support/a/a/g;
java.lang.RuntimeException: can,t modified Field:abc_background_cache_hint_selector_material_dark(I),
in class :Landroid/support/design/R$color;
at com.euler.patch.diff.DiffInfo.addModifiedFields(DiffInfo.java:88)
at com.euler.patch.diff.DexDiffer.compareField(DexDiffer.java:125)
at com.euler.patch.diff.DexDiffer.compareField(DexDiffer.java:101)
at com.euler.patch.diff.DexDiffer.compareField(DexDiffer.java:95)
at com.euler.patch.diff.DexDiffer.diff(DexDiffer.java:32)
at com.euler.patch.ApkPatch.doPatch(ApkPatch.java:68)
at com.euler.patch.Main.main(Main.java:97)
--
依赖里面有些用到'com.android.support:appcompat-v7:+'这种的,怀疑依赖版本不一致导致的?望解答,谢谢!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing patch generation and trace the reported failure at com.euler.patch.diff.DiffInfo.java:88. Read DexDiffer.java, ApkPatch.java, and Main.java around the listed stack frames, then compare the dependency versions and modified fields involved. Done means the reported two-line code change produces a patch without the RuntimeException.
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
- Mostly clear
- Newbie friendliness
- 32/100