After looking through the source code with no clue on where the problem would be, I remembered I had Proguard enabled. Proguard modifies method names to short names like: a, b, c, d and so on. So it is obvious that when clicking on a button all you will get is a NoSuchMethodException because the method itself has been renamed to something else.
To avoid this problem, I've added this to my proguard.cfg:
-keepclassmembers class package.name.YourActivity { public void handleXxxYyyButton(android.view.View); }
This problem is tricky because on development mode it works perfectly as Proguard is no involved. It will only throw an exception when you actually deploy your exported application. That said, I recommend everyone to test applications with the exported signed package before releasing them to the market.
5 comments:
Thank you. We are also into similar problem and seems to be no issue with the code. We will try this.
Mohan:
Great to hear that!! =) I hope it helps you in solving the problem.
Thanks for sharing the post.. parents are worlds best person in each lives of individual..they need or must succeed to sustain needs of the family. vShare iOS 11
I recently found many useful information in your website especially this blog page. Among the lots of comments on your articles. Thanks for sharing. Jailbreak iOS 11.3
SBGame Hacke randroid
Post a Comment