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

Migration to AndroidX #14

Open
grasmussen-phunware opened this issue Sep 5, 2019 · 0 comments
Open

Migration to AndroidX #14

grasmussen-phunware opened this issue Sep 5, 2019 · 0 comments

Comments

@grasmussen-phunware
Copy link

grasmussen-phunware commented Sep 5, 2019

To whom this may concern:

I know this issue is similar to #11 ; however, that one is closed.

I have been working on migrating a project to AndroidX and it was held up by an issue like this: Unable to resolve dependency for <The consumer module>@debug/compileClasspath: Failed to transform artifact <The aar file> to match attributes {artifactType=jar}.

I resolved the issue, by doing the following:

  1. Clone the repository.
  2. Update the analytics-android-integration-localytics project to the latest Android updates, including AndroidX.
  3. Generate a jar file instead of an aar file. (This is the winning item here. It must be me jar file for it to work. An aar file isn't needed anyway since there aren't any resources in this project's aar file.)
  4. Remove the existing maven dependencies in the consuming project.
  5. Import the jar file as new module in the consuming project.
  6. Rebuild the consuming project.

Now that the consuming project is using a new module, which houses the new jar file, the Gradle transform steps works just fine. It will not work with the aar file at all.

I recommend that the project be updated to the latest versions of Android, Android libraries, etc, and that a jar file be distributed along with the aar file to enable dependent projects to consume the jar artifact.

If it helps, I've uploaded a Git patch file with the Android updates for this project.

Best,

Gregory

androidx_migration.patch.zip

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

No branches or pull requests

1 participant