在Android源码环境编译APK,加入fastjson jar包,编译时报错。
LOCAL_STATIC_JAVA_LIBRARIES := fastjson
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := fastjson:libs/fastjson-1.1.51.android.jar
错误:
[ 8% 2/23] build out/target/common/obj/JAVA_LIBRARIES/fastjson_intermediates/classes.jack
FAILED: /bin/bash -c "(mkdir -p out/target/common/obj/JAVA_LIBRARIES/fastjson_intermediates/classes.jack.tmpjill.res ) && (unzip -qo packages/apps/SMS/libs/fastjson-1.1.51.android.jar -d out/target/common/obj/JAVA_LIBRARIES/fastjson_intermediates/classes.jack.tmpjill.res ) && (find out/target/common/obj/JAVA_LIBRARIES/fastjson_intermediates/classes.jack.tmpjill.res -iname "*.class" -delete ) && (JACK_VERSION=3.36.CANDIDATE out/host/linux-x86/bin/jack @build/core/jack-default.args --verbose error -D jack.import.resource.policy=keep-first -D jack.import.type.policy=keep-first -D jack.android.min-api-level=1 --import packages/apps/SMS/libs/fastjson-1.1.51.android.jar --import-resource out/target/common/obj/JAVA_LIBRARIES/fastjson_intermediates/classes.jack.tmpjill.res --output-jack out/target/common/obj/JAVA_LIBRARIES/fastjson_intermediates/classes.jack ) && (rm -rf out/target/common/obj/JAVA_LIBRARIES/fastjson_intermediates/classes.jack.tmpjill.res )"
com.android.sched.scheduler.RunnerProcessException: Error during 'CodeItemBuilder' runner on 'public static java.util.List com.alibaba.fastjson.util.TypeUtils.computeGetters(java.lang.Class clazz, int modifiers, boolean fieldOnly, com.alibaba.fastjson.annotation.JSONType jsonType, java.util.Map aliasMap, boolean sorted, boolean jsonFieldSupport, boolean fieldGenericSupport) (TypeUtils.java:821-1092)'
at com.android.sched.scheduler.ScheduleInstance.runWithLog(ScheduleInstance.java:163)
at com.android.sched.scheduler.MultiWorkersScheduleInstance$SequentialTask.process(MultiWorkersScheduleInstance.java:442)
at com.android.sched.scheduler.MultiWorkersScheduleInstance$Worker.run(MultiWorkersScheduleInstance.java:162)
Caused by: java.lang.NullPointerException
at com.android.jack.dx.ssa.InterferenceRegisterMapper.areAnyPinned(InterferenceRegisterMapper.java:144)
at com.android.jack.dx.ssa.back.FirstFitLocalCombiningAllocator.fitPlanForRange(FirstFitLocalCombiningAllocator.java:1046)
at com.android.jack.dx.ssa.back.FirstFitLocalCombiningAllocator.findAnyFittingRange(FirstFitLocalCombiningAllocator.java:987)
at com.android.jack.dx.ssa.back.FirstFitLocalCombiningAllocator.findRangeAndAdjust(FirstFitLocalCombiningAllocator.java:917)
at com.android.jack.dx.ssa.back.FirstFitLocalCombiningAllocator.adjustAndMapSourceRangeRange(FirstFitLocalCombiningAllocator.java:786)
at com.android.jack.dx.ssa.back.FirstFitLocalCombiningAllocator.handleInvokeRangeInsns(FirstFitLocalCombiningAllocator.java:513)
at com.android.jack.dx.ssa.back.FirstFitLocalCombiningAllocator.allocateRegisters(FirstFitLocalCombiningAllocator.java:182)
at com.android.jack.dx.ssa.back.SsaToRop.convert(SsaToRop.java:91)
at com.android.jack.dx.ssa.back.SsaToRop.convertToRopMethod(SsaToRop.java:61)
at com.android.jack.dx.ssa.Optimizer.optimize(Optimizer.java:107)
at com.android.jack.dx.ssa.Optimizer.optimize(Optimizer.java:71)
at com.android.jack.backend.dex.rop.CodeItemBuilder.run(CodeItemBuilder.java:373)
at com.android.jack.backend.dex.rop.CodeItemBuilder.run(CodeItemBuilder.java:116)
at com.android.sched.scheduler.ScheduleInstance.runWithLog(ScheduleInstance.java:161)
... 2 more
Internal compiler error (version 1.2-rc4 'Carnac' (298900 f95d7bdecfceb327f9d201a1348397ed8a843843 by android-jack-team@google.com)).
Warning: This may have produced partial or corrupted output.
暂无答案!
目前还没有任何答案,快来回答吧!