Well, evidently it's already mentioned in passing in issue 16384. I added my vote to the issue.
On May 1, 11:01 pm, Romain Guy <[email protected]> wrote: > Methods referred by the XML onClick attributes are invoked by reflection, > which is why Proguard believes they should be removed. You should file a > feature request (enhancement) at b.android.com if you'd like the tools to > keep these methods. > > > > > > On Sun, May 1, 2011 at 6:55 PM, Ted Hopp <[email protected]> wrote: > > Apparently proguard decides that it's an unused method because nothing > > in my code references it, and optimizes it away. > > > On May 1, 9:10 pm, a a <[email protected]> wrote: > > > 2011/5/2 Ted Hopp <[email protected]>: > > > > > For every new project, I always have to add the following lines to > > > > proguard.cfg: > > > > > -keepclassmembers class * extends android.app.Activity { > > > > public void *(android.view.View); > > > > } > > > > > Otherwise the onClick methods disappear when I publish the app. Is > > > > why? > > > > > there a way for us to change the default proguard.cfg file that's > > > > created with a new project? > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "Android Developers" group. > > > > To post to this group, send email to > > [email protected] > > > > To unsubscribe from this group, send email to > > > > [email protected] > > > > For more options, visit this group at > > > >http://groups.google.com/group/android-developers?hl=en > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- > Romain Guy > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support. All such questions should be posted on public > forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

