Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

LoginActivity resource ProGuard warnings in v3.7.0 #121

Closed
niedzielski opened this issue Jan 15, 2016 · 11 comments
Closed

LoginActivity resource ProGuard warnings in v3.7.0 #121

niedzielski opened this issue Jan 15, 2016 · 11 comments
Assignees
Labels
Milestone

Comments

@niedzielski
Copy link
Contributor

Upgrading from version v3.6.2 to v3.7.0 has produced two new ProGuard warnings:

Warning: net.hockeyapp.android.LoginActivity: can't find referenced field 'int input_password' in program class net.hockeyapp.android.R$id
Warning: net.hockeyapp.android.LoginActivity: can't find referenced field 'int button_login' in program class net.hockeyapp.android.R$id

Am I missing a step? I tried to follow the upgrade notes here[0]. Our project is fully open source and the upgrade diff is tiny[1].

[0] https://github.com/bitstadium/HockeySDK-Android/releases/tag/3.7.0
[1] https://gerrit.wikimedia.org/r/#/c/264255/

@matthiaswenz
Copy link
Contributor

Thanks for mentioning. I'll be looking into this.

@matthiaswenz matthiaswenz self-assigned this Jan 18, 2016
@matthiaswenz
Copy link
Contributor

Using our Demo project I can't reproduce the reported issue - it's working fine.
Your project does not seem to use the HockeyApp LoginActivity class at all so I wonder why it wouldn't just strip the information.
I noticed your commit in Gerrit dropped all HockeyApp-related ProGuard config - was this intentional?

@niedzielski
Copy link
Contributor Author

@ranterle, you're right. This is all on our end. We also have a layout file named activity_login.xml which caused the symbols to be dropped. Thanks for checking and the pointer to the demo project, that was helpful.

It was intentional to drop the HA ProGuard configuration since you now distribute an Android archive instead of a jar.

wmfgerrit pushed a commit to wikimedia/apps-android-wikipedia that referenced this issue Jan 21, 2016
Upgrade HockeyApp to v3.7.0[0]. Also, rename the activity_login.xml
layout file to work around a resource conflict in the new aar[1]. This
patch was tested for crash logging, crash report preference, remote
logging, and locale changes on the production release build variant.

[0] https://github.com/bitstadium/HockeySDK-Android/releases/3.7.0
[1] bitstadium/HockeySDK-Android#121

Bug: T123579
Change-Id: Ia73343357adbea92480dace7a2a5c9a6f16093ff
@joaocsousa
Copy link

@niedzielski I'm having the same issue and I'm having trouble fixing it. Can you please explain briefly what the problem was in your case and how you solved it? Do you still need those hockey app specific proguard rules? Thank you!

@matthiaswenz
Copy link
Contributor

Just a quick heads up on this: We are currently not shipping any specific ProGuard configuration with our Android archive. We're working on getting this fixed.

@niedzielski
Copy link
Contributor Author

@joaocsousa, we had an Activity layout resource file named activity_login.xml that conflicted with an identically named filed in the new HockeyApp library. We renamed our copy to activity_foo_login.xml and updated our call Activity.setContentView().

@ranterle, oh nuts. We must have lucked out. Thanks for the heads up!

@ghost
Copy link

ghost commented Feb 17, 2016

@ranterle it would be great if you could name your library resources with some sort of qualifier to avoid conflicting with IDs that your host app might use. Apps shouldn't really have to worry about naming conflicts with their third party libraries.

@matthiaswenz matthiaswenz reopened this Feb 17, 2016
@matthiaswenz
Copy link
Contributor

@ehlkej resource IDs from our SDK should be in a different namespace than those from apps. Can you post the details and some sample code of the problem here or create a support request and I'll look into them?

@matthiaswenz
Copy link
Contributor

@ehlkej @niedzielski @joaocsousa Looking into that, we will soon have a PR and 3.7.1 release which fixes our ProGuard shortcomings. Sorry for the trouble. Our testing didn't reveal any problems before, we will extend our review process to make sure it doesn't happen again.

@tomblenz
Copy link

Thank you @ranterle - top notch responding :)
I can confirm that renaming our activity_login.xml fixes this issue.

@matthiaswenz
Copy link
Contributor

Please have a look at #132 which addresses this issue.

@matthiaswenz matthiaswenz added this to the 3.7.1 milestone Feb 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants