Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#459 dontobfuscate -> Conversion to Dalvik format failed

v4.8
open-accepted
6
2012-12-17
2012-12-12
1gravity LLC
No

I have the same issue as referred to in http://stackoverflow.com/questions/9651703/using-proguard-with-android-without-obfuscation.
When the option -dontobfuscate is used in an Android project the export fails with "Conversion to Dalvik format failed with error 1".
I tried this with several projects and it's the same with all my projects. If I remove the option the build runs through without problems.
I'm using Eclipse 3.6.2, ADT 21.0.0 and ProGuard 4.8.

I attached a sample project based on the Snake sample included with the Android SDK to reproduce the problem.

Discussion

  • 1gravity LLC
    1gravity LLC
    2012-12-12

    Sample Project to reproduce the issue

     
    Attachments
  • Eric Lafortune
    Eric Lafortune
    2012-12-17

    • assigned_to: nobody --> lafortune
    • priority: 5 --> 6
    • labels: 2404146 --> Optimization
    • status: open --> open-accepted
     
  • Eric Lafortune
    Eric Lafortune
    2012-12-17

    Thanks for the report. ProGuard's optimization step sometimes has a hard time keeping the debug information about local variables synchronized with the code. Alternative work-arounds:
    - Compile without debug information about variables (<javac debuglevel="lines,source" .....> in android-sdk/tools/ant/build.xml).
    - Don't disable obfuscation (removing the attributes containing this debug information)
    - Disable optimization of local variables (-optimizations !code/allocation/variable)
    - Disable all optimizations (-dontoptimize)