Conversion to dalvik format failed with error 1

6,792 views
Skip to first unread message

Tomcat

unread,
Feb 1, 2013, 12:33:29 PM2/1/13
to actionba...@googlegroups.com
Hi,
I've developing some application and everything on emulator and in debug on devices works perfectly.
When I try to export my application (both signed and unsigned) I got a "conversion to dalvik format failed with error 1".
The strange thing is that this error occuors 95% times i try to export my application and (without doing any modifications to the system between the variuos time I've tried) some rare times it works.
I've also already tried all the solution I found on internet ( check if some libraries is included twice, rebuild the project, clean and build, restart eclipse, proguard is disabled, support library is included in project)
I'm using ADT r21 - Eclipse Juno - ActionbarSherlock 4.2.0
Anyone can help?
Thanks

Maarten Van Lier

unread,
Feb 5, 2013, 10:40:25 AM2/5/13
to actionba...@googlegroups.com
Hi,

I'm  having this exact issue too.
I can run the application without problems using run as -> android application in the emulator and on real devices (2.2 and 4.0)
But when I try to export it, I get the same "Conversion to dalvik format failed with error 1"
I also tried to remove duplicate libraries but could't solve it that way...

Have you found a solution yet?

Kind regards,
Maarten

Fernando Manso

unread,
Feb 5, 2013, 4:32:52 PM2/5/13
to actionba...@googlegroups.com
Hi,

Same issue here. I've tried everything from Stackoverflow and this group. 

Kind regards,
Fernando Manso.

Aru Sahni

unread,
Feb 5, 2013, 5:35:56 PM2/5/13
to actionba...@googlegroups.com
I know you've disabled ProGuard, but have you tried dropping the latest PG binary into the appropriate SDK directory?

This isn't an ABS issue, so you'd be better off asking on SO or an general Android dev forum.

--
You received this message because you are subscribed to the Google Groups "ActionBarSherlock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to actionbarsherl...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Maarten Van Lier

unread,
Feb 6, 2013, 10:28:42 AM2/6/13
to actionba...@googlegroups.com
I'm not using ProGuard, but what seems to work consistently for me is:
  • Go to Project -> uncheck Build Automatically
  • Go to Project -> Clean... , clean both the library project and your app project
  • Export your app as a signed APK while Build Automatically is still disabled
I'm not sure why, but it seems to do the trick for me.

Tomcat

unread,
Feb 7, 2013, 3:46:12 AM2/7/13
to actionba...@googlegroups.com
Thannks, your process works perfectly for me!
After many attempts I found another process.
- Export application with a device connected
- When I got the error wait till finish building
- Click ok on the dialog
- Disconnect the device
- Click finih on the dialog to re-export the application

JoemarieAmparo

unread,
Feb 7, 2013, 5:25:34 AM2/7/13
to actionba...@googlegroups.com
I am using Pro-Guard. All the cleaning and rebuilds the error still occur. But I found another way to get out from this and successfully export signed package. This is through deleting bin and gen folder in you project folder. Go back to eclipse and clean your project. 

Hope this helps.

Michael Lamers

unread,
Feb 14, 2013, 2:26:13 PM2/14/13
to actionba...@googlegroups.com
Hi,

I had exactly the same problem.
The export worked some times after 3 tries and sometimes it took 15+ tries to get an apk out.

Since 2 days the maximum number of tries has been 2 and this is what I did:

I have a couple of libraries referenced by my main application. Three of these libraries are my own.
I realised that ActionBarSherlok prefixed all resources with "abs__" (I assume to avoid name collisions). I did this for my libraries as well and since then the export works far better.

I'm not 100% sure yet but as this issue is a pita and was driving me nuts I thought I share this with you.
Hopefully that did the trick in the long run.

Michael

Randy Reyes

unread,
Mar 3, 2013, 10:40:07 AM3/3/13
to actionba...@googlegroups.com
Hi,

I had the same issue a few days ago. I'm using ActionbarSherlock and another library. I solved the issue by excluding the generated R classes on both of the library projects when you export, because they are automatically added on your project when you added those libraries on your project. Don't forget to include them again after generating the apk. Hope this helps.
Reply all
Reply to author
Forward
0 new messages