0

I followed the steps here to decode an APK file, and tried to compile the decoded project in eclipse. But I found some errors, which some of them are trivial programming mistakes. Here is an examples:

int i;
    for (int j = 0;; j++)
            {
                if (j >= i)
                    return;
             }

This error says that the local variable i may not have been initialized. The APK file, means that the project has been compiled successfully, so what's wrong? Is there any problem with my dex2jar file, so that it has missed some parts of the code? Thanks for your help.

Community
  • 1
  • 1
Farid Ala
  • 668
  • 1
  • 12
  • 30

1 Answers1

1

Here is the correction:

int i = 0;
for (int j = 0;; j++)
            {
                if (j >= i)
                    return;
             }

You should decompile your own project, one that you still have the original source for. That's the best way to see how unreliable a compiler really is and how unreadable it becomes. Decompiling a project is not trivial. You may still need to make some manual adjustments afterwards.

Stephan Branczyk
  • 9,363
  • 2
  • 33
  • 49
  • You are right, I believed that after decompiling project, there is no need to some manual adjustments. Thanks for your reply. – Farid Ala Oct 06 '13 at 19:52