开发者

Android project gives error! "Conversion to Dalvik format failed with error 1"

My android project gives and error but non of my classes have one. The error is "Conversion 开发者_如何学编程to Dalvik format failed with error 1". The problem is that it was working properly yesterday without any errors. Why my eclipse gives this error? Is she angry or something because I was trying to cheat her with NetBeans?

Any answers would be nice. Thanks in advance.


Funny bug. Clean, refresh and try to export again. If that fails repeat a couple of times.

Make sure that the included jars/libraries or similar doesn't have an error in them. Mine had the other day since somehow eclipse automatically changed the import to import android.R instead of my R file.

Usually fixed by cleaning the project and retrying, sometimes though I have to copy a to a new project or even restart eclipse.


I had the same problem and cleaning multiple times didn't work.

I fixed it by removing and re-adding the library project in the application project.
Project > Properties > Android > remove libraries > Apply > add libraries again > OK

For jars, I don't know, but a similar solution might be possible...
Project > Properties > Java Build Path > Libraries tab > remove jars > OK > reopen to Libraries tab > re-add jars > OK

Of course, that's not really possible if you aren't using any libraries, but in my case that's what did the trick.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜