Android Jack错误 - 没有为注册指定映射

时间:2017-03-21 18:52:39

标签: android android-source

我试图通过在Android.mk中添加aar来在我的APK中加入第三方

我在构建APK时遇到以下错误

com.android.sched.scheduler.RunnerProcessException:
 Error during 'CodeItemBuilder' runner on 'public final void com.third.party.package.activities.OAuthAuthorize$2.onReceivedTitle(
android.webkit.WebView view, java.lang.String title)
 (SourceFile:135-170)': no mapping specified for register
    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.RuntimeException: no mapping specified for register
    at com.android.jack.dx.ssa.BasicRegisterMapper.map(BasicRegisterMapper.java:64)
    at com.android.jack.dx.ssa.RegisterMapper.map(RegisterMapper.java:53)
    at com.android.jack.dx.ssa.NormalSsaInsn.mapSourceRegisters(NormalSsaInsn.java:48)
    at com.android.jack.dx.ssa.SsaInsn.mapRegisters(SsaInsn.java:159)
    at com.android.jack.dx.ssa.SsaMethod.mapRegisters(SsaMethod.java:389)
    at com.android.jack.dx.ssa.back.SsaToRop.convert(SsaToRop.java:100)
    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)).
no mapping specified for register.
Warning: This may have produced partial or corrupted output.
make: *** [out/target/common/obj/JAVA_LIBRARIES/SprintMobileFWLib_intermediates/classes.jack] Error 3
make: *** Deleting file `out/target/common/obj/JAVA_LIBRARIES/SprintMobileFWLib_intermediates/classes.jack'
make: *** Waiting for unfinished jobs....

到目前为止我做了什么,

禁用proguard

 LOCAL_PROGUARD_ENABLED := disabled

下一步

试图添加proguard.flags

 LOCAL_PROGUARD_FLAG_FILES := proguard.flags

在proguard.flags

-keep class com.third.party.package.** { *; }

-dontoptimize

-dontpreverify

下一步

尝试将大部分JACK优化和混淆添加到false

LOCAL_JACK_FLAGS := -D jack.dex.optimize=false \
                -D jack.optimization.def-use-simplifier=false \
                -D jack.optimization.enum.switch=false \
                -D jack.optimization.expression-simplifier=false \
                -D jack.optimization.if-simplifier=false \
                -D jack.optimization.inner-class.accessors=false\ 
                -D jack.optimization.not-simplifier=false \
                -D jack.optimization.null-instanceof-simplifier=false \
                -D jack.optimization.tail-recursion=false \
                -D jack.optimization.use-def-simplifier=false \
                -D jack.obfuscation.classdictionary=false \
                -D jack.obfuscation.dictionary=false \
                -D jack.obfuscation.flattenpackage=false \
                -D jack.obfuscation.mapping=false
                -D jack.obfuscation.mapping.collision-policy=ignore \
                -D jack.obfuscation.packagedictionary=false \
                -D jack.obfuscation.renamesourcefile=false \
                -D jack.obfuscation.repackageclasses=false

任何有关禁用插孔/吉他优化的帮助都表示赞赏。

0 个答案:

没有答案