6

recently I update my Android SDK to 14.0.0

Environment: Ubuntu 10.04, Eclipse Helios.

The project target is 8 (Android 2.2)

In my project I use maven. Then I try to build project i get next error: "Conversion to Dalvik format failed with error 1"

And the maven said next: "Cannot create the APKBuilder object null"

BUT, if i create Android project without maven - all OK.

UPDATE:

The cleaning project don't help me

j0k
  • 22,600
  • 28
  • 79
  • 90
ihrupin
  • 6,932
  • 2
  • 31
  • 47
  • Apparently there are some [incompatability issues](https://github.com/rgladwell/m2e-android/issues/45) in m2e-android eclipse plugin, however, the latest [maven-android-plugin](http://code.google.com/p/maven-android-plugin/wiki/Changelog) seems OK with SDK r14. – yorkw Oct 26 '11 at 02:22
  • I didn't found solution. Now i revert my environment to r12. I steel need your help! – ihrupin Oct 27 '11 at 13:22
  • I had the exact same problem. The solution was to stop using maven. We only used it to get 2 libraries, so the change was pretty easy. – renam.antunes Oct 27 '11 at 15:45
  • Two questions: 1. are you using proguard in your project? 2. Look at the Console/Problems/Error log Eclipse View. Are there any details about this error? – Kocus Oct 29 '11 at 20:18
  • @renam.antunes That is not a solution ihrupin, or me were hoping for. I'm facing the same issue and I import too many libraries to manage them with Eclipse, a side the fact that I have many projects which are pure Java, and I want to import them into the Android project. Could anyone shade some light on this error? what causes it? My Eclipse performs terribly after a single attempt to launch the application, performance which forces me to restart Eclipse so I can't even track the Console! – TacB0sS Nov 01 '11 at 14:39
  • have you tried r15 + update maven from yorkw link? – renam.antunes Nov 02 '11 at 04:51
  • I don't think you can get a solid answer here, the only thing we can do now is waiting for an update of maven-android-plugin or m2e-android, or if you are knowledgeable, make contribution to those open source project. – yorkw Nov 02 '11 at 09:18
  • I've found a partial workaround for the problem, I was able to produce the final apk in the target\android-classes\.apk using maven, but I could not get Eclipse to launch the project. one of the main reasons to not finding a complete workaround is the face that the .classpath output field is been changed back to bin\classes for some reason with every Eclipse build. I've also wrote a nice batch script to perform all the actions both adb and maven to clean build install, and launch the project, to complete the workaround. Would you like to see the workaround? – TacB0sS Nov 02 '11 at 18:42
  • I agree with @TacB0sS. The Eclipse didn't run the project. I maked nice script too, but it did't fix all my problems. I steel need running project with Eclipse. – ihrupin Nov 02 '11 at 20:56
  • I've updated to ADT 15 but the problem persists, perhaps there is a problem because I also use Android libs, and J2Se libs, in the same project? Hmmm... I'll see if I can reproduce the problem on a smaller scale then my entire project... and post back soon – TacB0sS Nov 06 '11 at 18:11
  • @TacB0sS could you please give the link to your question? – ihrupin Nov 06 '11 at 19:57
  • Still trying to figure this one out... I would expect this to be simple... install maven install all the plugins, I even used the android maven archetype, but even the Helloworld project does not build... WTF? – TacB0sS Nov 06 '11 at 20:10
  • I'm trying to download again everything... Android tools, Eclipse, reinstall all the plugins... from scratch! I'll let you know how it goes – TacB0sS Nov 06 '11 at 20:33
  • Did not work... I found a couple of workarounds, playing with the .classpath and .project file, but Eclipse keep changing these files according to the Natures defined in the .project file, which messup the workaround... this is terrible man if I don't find a solution, I would have to start working old school which is very very bad! – TacB0sS Nov 07 '11 at 01:53
  • Well I think we all share the same problem... http://code.google.com/p/maven-android-plugin/issues/detail?id=214 – TacB0sS Nov 07 '11 at 22:03

1 Answers1

1

This looks like a known issue with the Android M2E Connector:

See here:

https://github.com/rgladwell/m2e-android/issues/45

and here:

http://code.google.com/p/android/issues/detail?id=21031

It looks like there is a fix for it with ADT 15 and the latest Android M2E Connector

Try to upgrade to the latest ADT 15 and Android M2E Connector using the instructions provided here on the m2e android connector site.

nicordesigns
  • 904
  • 1
  • 9
  • 18
  • Thanks, I will try it soon. Now I reverted to ADT-12. If it help me I will accept answer or tell my fail results. – ihrupin Nov 22 '11 at 16:04