I\'m kind of a noob in the android world, and doing a pet project for exercising. It\'s a very simple reminder-like app with just two activities. One is a customized ListVie
I did some more tests and lockon the problem in the anonymous inner class for Back button, since the error will appear whenever I clicked this before restarting the app. If I switch activities using the "go back" button on the phone, everything is fine.
I added one line in the inner class
EditEntry.this.finish();
It does solve the problem. I tried to test it more systematical this time. Let's say the code without the above line is A, and the code with this line is B. Scenario goes like follow
1.run A then A --> Error
2.run A then B --> Error
3.run B then A --> OK
4.run B then B --> OK
Therefore, I assume it is some kind of problem about the activity stack?
I had exactly the same error, although with other and more simpler code than yours. I found out that the problem occurred only if I didn't close the app in the emulator after re-run it from eclipse. So if I close it before run it from eclipse, everything works fine. But since I am really new to android, I have no clue why this is so. I previous test apps this was never a problem.
Actually, the real solution to this problem is a folder permissions issue. Make sure you are operating in a folder that you can modify. I just fixed that same problem for my self by making sure I was in a folder with the right permissions.