Reputation: 1053
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 ?
Upvotes: 3
Views: 4432
Reputation: 14754
I see that's an old problem, but I found an another solution:
Remove -XX:+AggresiveOpts
from eclipse.ini
.
Upvotes: 10
Reputation: 116
Just in case somebody comes here from a Google search for "Conversion to Dalvik format failed with error 2". I had the same issue and it seemed to be related to the JVM or the Eclipse startup options.
Updating to Java 7 resolved this.
Upvotes: 0
Reputation: 1053
Actually it's becouse my lib projects pacage name is not the same as in my main project.
Upvotes: 1