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

Updated Android Support Library to Android X library #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aitJess
Copy link

@aitJess aitJess commented Jan 13, 2021

Description

Updated use of support library for annotations to the androidx library. This is due to the support library no longer being maintained and the androidx library replacing it.

Related Issue

#42

Motivation and Context

This change is required due to android's maintenance of the support library stopping, which may eventually lead to them deprecating the library. This is to future proof the plugin and allow it to work with other updated plugins.

How Has This Been Tested?

Since all it changed was the used libraries for certain function tags -- namely FloatRange, IntRange, NotNull, and Nullable -- I've tested it in my own cordova app and was able to successfully build with Android X Support.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
    This would cause anyone updating to this latest version to no longer be able to use the plugin when Android X support is disabled.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

Updated use of support library for annotations to the androidx library. This is due to the support library no longer being maintained and the androidx library replacing it.
@daveshirman
Copy link

I tried to use this today and I just get the application crashing when it loads on the emulator or my device, this is with Capacitor and Ionic 5 and no other plugins installed.

Error:

android.app.Application cannot be cast to __PACKAGE_NAME__.MainApplication

Any ideas?

@aitJess
Copy link
Author

aitJess commented Mar 4, 2021

Hello @daveshirman , I cannot think of anything that may cause that off the top of my head but when I have time I'll look into it and update my branch.
For the moment there is a plugin that should auto-replace any outdated support libraries for androidx you may use in the future. I had wanted to solve this issue permanently rather than relying on yet another plugin. Here is said plugin, try it with the normal branch for the playlist plugin and see if it resolves your issue.
https://www.npmjs.com/package/cordova-plugin-androidx-adapter

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.

2 participants