Alex Curran
Alex Curran

Reputation: 8828

Proguard and Dalvik error code 1

I've been having a problem with obfuscating my code using ProGuard. I've tried all the suggestions on the other, similar questions on here and still it doesn't work.

Essentially, here are all the facts I can glean from the situation:

UPDATES:

The end of the console output:

[2012-01-06 17:45:07 - FormulaePro] applyFileOverlay for mipmap
<lots of "new resource id" things>
[2012-01-06 17:45:43 - FormulaePro]     (new resource id view from D:\Dropbox\Android\FormulaeLib\res\menu\view.xml)
[2012-01-06 17:45:43 - FormulaePro]   Writing symbols for class R.
[2012-01-06 17:45:43 - FormulaePro]   Writing symbols for class R.
[2012-01-06 17:45:43 - FormulaePro]   Writing symbols for class R.
[2012-01-06 17:45:43 - FormulaePro]   Writing symbols for class R.
[2012-01-06 17:45:45 - FormulaePro] Starting full Package build.
[2012-01-06 17:45:45 - FormulaePro] Skipping over Post Compiler.

So, can someone much cleverer than me figure out what the heck is going on?

Upvotes: 2

Views: 1533

Answers (5)

Justin
Justin

Reputation: 6594

I recently had an error with proguard after updating the Android SDK... I kept getting an "Error 1" issue as well. What fixed it for me was downloading the latest proguard binaries and replacing the ones that came with the Android SDK.

Hopefully this helps for all of you as well...

http://sourceforge.net/projects/proguard/files/

Upvotes: 1

user1087919
user1087919

Reputation:

i also got same problem when i upgraded to ADT 16 yesterday. To solve problem I removed ADT 16 and installed ADT 15.

Try this. This might solve your problem

Upvotes: 0

Mainank Brahmbhatt
Mainank Brahmbhatt

Reputation: 732

Please Remove library & Once again Configure build path then the Dalvik Virtual Machine Error will be removed.

Try to Fix properties to 1.6 Compiler Once again.

Try it will resolve your issue!!!

Upvotes: 0

neteinstein
neteinstein

Reputation: 17613

Besides the points refered by @Bill The Ape, have you upgraded your proguard files after updating the SDK?

That can be the problem, check out here: https://stackoverflow.com/a/7386541/327011

Upvotes: 2

Bill The Ape
Bill The Ape

Reputation: 3306

Have you recently upgraded to SDK Tools rev 14 or higher?

I am not cleverer than you are, but the problem you are describing reminds me of my recent awful experience with Dalvik error 1.

If this is the case, try this solution from the amazing @TheTerribleSwiftTomato:

  1. In your app project, check for any linked source folders pointing to your library projects (they have names in the form "LibraryName_src").
  2. Select all those projects, right-click, choose "Build Path"->"Remove from Build Path".
  3. Choose "Also unlink the folder from the project", and click "Yes".
  4. Clean, rebuild and redeploy the project.

Update: Another scenario I recently encountered: You renamed one of the classes. In that case, the files generated in the proguard folder (dump.txt, mapping.txt, seeds.txt, usage.ext) may not reflect that change. In that case, delete all 4 of them. They will automatically generated next time you use the File > Export - this time not generating the dreaded "Dalvik error 1".

Good luck!

Upvotes: 6

Related Questions