Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): solve and/or silence lint errors #6358

Merged
merged 2 commits into from
Mar 2, 2023
Merged

Conversation

jcesarmobile
Copy link
Member

When targeting SDK 33, multiple DiscouragedApi errors appear in BridgeActivity.java and AssetUtil.java classes because of the usage of reflection for getting resources from the name.

BridgeActivity.java I've used R.style.AppTheme_NoActionBar instead of the name, there was already a line like that for the activity theme, so removed the string one and replace the string with the R.style.AppTheme_NoActionBar on the app theme line. Not sure if it was a mistake to have them duplicated, but doesn't seem to break anything with the change.

For AssetUtil.java it can't be fixed because we allow plugins to get resources dynamically from the javascript name the users provide, so I've just silenced the warnings.
We could probably remove some of the methods that generate the warnings since looks like some of them are not being used, but not all of them.

@jcesarmobile jcesarmobile merged commit c627415 into main Mar 2, 2023
@jcesarmobile jcesarmobile deleted the fix-android-lint branch March 2, 2023 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants