-3

When I try to run my program in Eclipse, this error appears:

[2012-07-08 22:02:05 - Dex Loader] Unable to execute dex: (class: com/android/dx/dex/file/UniformListItem, method: toHuman signature: ()Ljava/lang/String;) Illegal local variable number

[2012-07-08 22:02:05 - CheckApp] Conversion to Dalvik format failed: Unable to execute dex: (class: com/android/dx/dex/file/UniformListItem, method: toHuman signature: ()Ljava/lang/String;) Illegal local variable number

What's the problem and what should I do?
Thanks for everyone who will help!

Roni Copul
  • 179
  • 1
  • 1
  • 8
  • 2
    Please post the code of that class. – Egor Jul 08 '12 at 19:07
  • @Egor In some reason the editor didn't give me to add the code, but here the code in pastebin: MainActivity class - http://pastebin.com/Bb3Rs3pY DisplayMessageActivity class - http://pastebin.com/DYUgb8zR – Roni Copul Jul 08 '12 at 19:15
  • Is this only related to one program or your every program come up with this error ? – SALMAN Jul 08 '12 at 19:18
  • @SALMAN Well actually I have only 1 android program, but all the other PC projects are working just fine. – Roni Copul Jul 08 '12 at 19:20
  • What is the code? Is it a library that was precompiled with desktop Java (You did mention *all the other PC projects are working just fine*)? Look, all am saying is this, we're not mind-readers, we have not got a clue as to what is the problem based on your vague question either. – t0mm13b Jul 08 '12 at 19:38
  • downvoting, and voting to close because the question is very poor quality. – t0mm13b Jul 08 '12 at 19:39
  • @t0mm13b Why have you removed the last line in the question?... And I didn't give enough information because I didn't know what the problem was about.. Maybe someone would tell that it's a settings problem that can be fixed? And that's why there are the comments in here - if the problem isn't understood enough or there's not enough information - tell me and I will add everything need, because after all what I want is the problem to be solved, not to laugh at you that you can't help or something like that – Roni Copul Jul 08 '12 at 19:46
  • No need to include "Thanks" as the *last line* in questions like this on StackOverflow. – t0mm13b Jul 08 '12 at 19:49
  • Have you investigated what *you* think it is? What have *you* done? What was the results of *your* research? Those things are expected from OPs on StackOverflow. – t0mm13b Jul 08 '12 at 19:51
  • @t0mm13b Don't criticize people. You want to help? help. Not want to? so don't. If I'm asking here the question it means that I HAVE done a research but didn't find anything that could help. And about the "Tanks" - I appreciate people who spend THEIR time to help ME, and I want to thank them. (Like SALMAN for example) – Roni Copul Jul 08 '12 at 20:05
  • This is not personal, its StackOverflow, certain things have to be expected if to participate in the community. :) More often then not, comments will crop up - "What have you done?", "Code please?", "question is too vague...", those sorts of comments frequent among questions like these, invariably, they *will* end up downvoted and closed due to the OP's style thinking we're here to dish out code and do their homework without showing any concrete effort on their part. We're not paid, we're volunteers with passion, but questions like above will kill their passionate/voluntary efforts. – t0mm13b Jul 08 '12 at 20:11
  • @t0mm13b I'm not interested in being voted up - I'm here to get help for my problem, and you might be surprised but because of many nice people in here (I'm sorry but you're not in this category) my problems got solved. Anyway, I don't want to continue this argument - you don't want to help? don't help – Roni Copul Jul 08 '12 at 20:14

1 Answers1

0

I found a blog entry that says increase the memory allocated in eclipse.ini to this: -Xms128m -Xmx512m or something higher, but this didn't do it for me.

However, I found another post that suggested doing Project > Clean and that fixed it for me. I think it happens when you shut down Eclipse w/o shutting the emulator down first.

SALMAN
  • 3,967
  • 1
  • 26
  • 21
  • The issue is not about Eclipse's memory usage! – t0mm13b Jul 08 '12 at 19:30
  • Where is the "Project > Clean" found? I tried pressing "Start.." in the AVD Manager, but it's still not working. – Roni Copul Jul 08 '12 at 19:33
  • 2
    @t0mm13b So what is it about? Do you have a suggestion how to solve the problem? – Roni Copul Jul 08 '12 at 19:37
  • 2
    @t0mm13b I will be awaiting for an answer . Thanks – SALMAN Jul 08 '12 at 19:39
  • The issue is relating to the dex bytecode compiler - read the OP's question and tell me how is that related to the `eclipse.ini` as per your answer. – t0mm13b Jul 08 '12 at 19:45
  • @RoniCopul Did u update your platform tool ? In that case this might help you . http://stackoverflow.com/questions/5943712/conversion-to-dalvik-format-failed-unable-to-execute-dex-java-heap-space – SALMAN Jul 08 '12 at 19:52
  • @SALMAN I have recently added some packages from the SDK Manager, but it worked a couple of times.. Anyway I'll try it - but I can't find the eclipse.ini file. Where is it found? – Roni Copul Jul 08 '12 at 20:07
  • 1
    Somehow the problem was solved by itself O__O but thanks anyway for trying to help! :D – Roni Copul Jul 08 '12 at 20:22
  • Did u restart your System or Eclipse :) ? This might have solved the problem by itself – SALMAN Jul 08 '12 at 20:39