Conversion to Dalvik format failed with error 2 adt 16.0.1

Showing 1-6 of 6 messages
Conversion to Dalvik format failed with error 2 adt 16.0.1 Hovo 1/10/12 7:29 AM
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 ?
Conversion to Dalvik format failed with error 2 adt 16.0.1 Hovo 1/10/12 7:29 AM
Re: Conversion to Dalvik format failed with error 2 adt 16.0.1 Manuel Ciosici 1/10/12 8:46 AM
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.
>

Re: Conversion to Dalvik format failed with error 2 adt 16.0.1 trombonehero 2/29/12 3:54 AM
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

Re: Conversion to Dalvik format failed with error 2 adt 16.0.1 trombonehero 2/29/12 3:43 AM
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?


Jon

[1] http://code.google.com/p/android/issues/detail?id=7147#c6
[2] http://code.google.com/p/android/issues/detail?id=15603
[3] http://code.google.com/p/android/issues/detail?id=20814
[4] http://code.google.com/p/android/issues/detail?id=26203
Re: Conversion to Dalvik format failed with error 2 adt 16.0.1 Jared Rummler 8/20/12 11:18 AM
What did you end up doing?