alibaba / alibaba/AndFix

apkpatch 抛异常,无法生成补丁文件

Open
#139 5 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

自己建了一个简单的helloword工程,结果用apkpatch.sh来使用,抛出如下异常:
java.lang.RuntimeException: can,t modified Field:VERSION_CODE(I), in class :Lmyself/myapplication/BuildConfig;
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)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with apkpatch.sh using the simple Hello World project, then start with DiffInfo.java:88 and follow the DexDiffer.compareField calls in the stack trace. Check how ApkPatch.doPatch reaches this error and determine what behavior is expected for BuildConfig.VERSION_CODE; done means the patch generation completes without this exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.