Conversion to Dalvik format failed with error 2 adt 16.0.1

1,188 views
Skip to first unread message

Hovo

unread,
Jan 10, 2012, 10:29:02 AM1/10/12
to android-platform
Recently we updated eclipse adt plugin to 16 version, and now can't
run our application, it compiles normally, but when we run, it throws
following error :

trouble writing output: No expanded opcode for 016be7fe @0032: sget-
object v4:Lorg/apache/http/HttpVersion;,
org.apache.http.HttpVersion.HTTP_1_1:Lorg/apache/http/HttpVersion;
Conversion to Dalvik format failed with error 2

And if we comment some ID's in our layout xml files, it run's again.
Our project is huge, and there are many library projects added to it.
Application runs normally with previous adt plugin that didn't export
library projects as .jar files. I guess that the reasone me be changes
in latest android versions that ID's now is not final fields.

My question is how can we fix this, and is there a limitation on ID
count in android xml files? Or maybe it is an android bug ?

Hovo

unread,
Jan 10, 2012, 10:29:17 AM1/10/12
to android-platform

Manuel Ciosici

unread,
Jan 10, 2012, 11:46:46 AM1/10/12
to android-...@googlegroups.com
Have you tried the following:
- clean all projects (sometimes weird things happen because of the xml files)
- make sure you haven't left comments in the XML files, I've experienced situations when everything past a comment in an xml file was not compiled
- make sure that all library projects are found and found as android library projects (right click on the project name and then Properties->Android and see the lower part of the window listing all the library projects)

Hope that helps.

Manuel

> --
> You received this message because you are subscribed to the Google Groups "android-platform" group.
> To post to this group, send email to android-...@googlegroups.com.
> To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.
>

trombonehero

unread,
Feb 29, 2012, 6:54:42 AM2/29/12
to android-...@googlegroups.com
On Tuesday, January 10, 2012 3:29:02 PM UTC, Hovo wrote:
And if we comment some ID's in our layout xml files, it run's again.
Our project is huge, and there are many library projects added to it.

There is, in fact, a hard limit of 64k field references or methods. There was talk back in March 2010 of adding "jumbo" references [1], but nothing's come of it yet and the limit has bitten others [2,3]. In the meantime, I have filed a new bug [2] about the poor diagnostic message.

Are you using ProGuard to strip unused references?


Jon

trombonehero

unread,
Feb 29, 2012, 6:43:59 AM2/29/12
to android-platform
On Jan 10, 3:29 pm, Hovo <hovhannes.safar...@gmail.com> wrote:
> And if we comment some ID's in our layout xml files, it run's again.
> Our project is huge, and there are many library projects added to it.
>
> My question is how can we fix this, and is there a limitation on ID
> count in android xml files? Or maybe it is an android bug ?

There is, indeed a Dalvik resource limit of 64k. According to [1],
there should be some support for more than 64k const strings, but
field and method references still need to fit into 16b of opcode.

Other people have complained about this [1-3], and I have filed a bug
about the poor-quality diagnostic message [4]. You might like to star
these issues to stay abreast of developments (and indicate that you
think they're important!).

In the meantime, are you using ProGuard to strip unneeded references?
[4] http://code.google.com/p/android/issues/detail?id=26203
Reply all
Reply to author
Forward
0 new messages