Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Jetifier fails on Mapbox aars when attempting to migrate to AndroidX

Open
#1,060 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, java

Research direction

Reproduce the AndroidX migration by building from the command line with the Mapbox plugin AARs, then inspect the JetifyTransform stack trace beginning at CoreRemapperImpl.kt:57 and ByteCodeTransformer.kt:38. Done means the project builds successfully without Jetifier errors for the Mapbox artifacts.

Written by the indexing model from the issue text.

Description

Steps to reproduce
  1. Migrate existing working project to AndroidX
  2. Build via gradle from command line.
Expected behavior

Successful build

Actual behavior

Errors thrown for each Mapbox aar as below. No errors on any other libraries.

> Could not resolve all files for configuration ':androidLib:debugCompileClasspath'.
   > Failed to transform artifact 'mapbox-android-plugin-annotation-v8.aar (com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v8:0.7.0)' to match attributes {artifactType=android-aidl}.
      > Execution failed for JetifyTransform: /Users/clyde/.gradle/caches/modules-2/files-2.1/com.mapbox.mapboxsdk/mapbox-android-plugin-annotation-v8/0.7.0/ad94f8386bc00f894c1c030b1188aec571e74533/mapbox-android-plugin-annotation-v8-0.7.0.aar.
         > Failed to transform '/Users/clyde/.gradle/caches/modules-2/files-2.1/com.mapbox.mapboxsdk/mapbox-android-plugin-annotation-v8/0.7.0/ad94f8386bc00f894c1c030b1188aec571e74533/mapbox-android-plugin-annotation-v8-0.7.0.aar' using Jetifier. Reason: null. (Run with --stacktrace for more details.)
   > Failed to transform artifact 'mapbox-android-plugin-building-v8.aar (com.mapbox.mapboxsdk:mapbox-android-plugin-building-v8:0.6.0)' to match attributes {artifactType=android-aidl}.
      > Execution failed for JetifyTransform: /Users/clyde/.gradle/caches/modules-2/files-2.1/com.mapbox.mapboxsdk/mapbox-android-plugin-building-v8/0.6.0/6c38df387e04b809466779f2299427fa78d0ac2c/mapbox-android-plugin-building-v8-0.6.0.aar.
         > Failed to transform '/Users/clyde/.gradle/caches/modules-2/files-2.1/com.mapbox.mapboxsdk/mapbox-android-plugin-building-v8/0.6.0/6c38df387e04b809466779f2299427fa78d0ac2c/mapbox-android-plugin-building-v8-0.6.0.aar' using Jetifier. Reason: null. (Run with --stacktrace for more details.)

The stacktrace is not particularly informative:

Caused by: java.lang.IllegalArgumentException
        at org.objectweb.asm.ClassVisitor.<init>(ClassVisitor.java:79)
        at org.objectweb.asm.commons.ClassRemapper.<init>(ClassRemapper.java:61)
        at org.objectweb.asm.commons.ClassRemapper.<init>(ClassRemapper.java:56)
        at com.android.tools.build.jetifier.processor.transform.bytecode.CoreRemapperImpl.<init>(CoreRemapperImpl.kt:57)
        at com.android.tools.build.jetifier.processor.transform.bytecode.ByteCodeTransformer.runTransform(ByteCodeTransformer.kt:38)
        at com.android.tools.build.jetifier.processor.Processor.visit(Processor.kt:443)
        at com.android.tools.build.jetifier.processor.archive.ArchiveFile.accept(ArchiveFile.kt:49)
        at com.android.tools.build.jetifier.processor.Processor.visit(Processor.kt:425)
        at com.android.tools.build.jetifier.processor.archive.Archive.accept(Archive.kt:76)
        at com.android.tools.build.jetifier.processor.Processor.visit(Processor.kt:425)
        at com.android.tools.build.jetifier.processor.archive.Archive.accept(Archive.kt:76)
        at com.android.tools.build.jetifier.processor.Processor.transformLibrary(Processor.kt:421)
        at com.android.tools.build.jetifier.processor.Processor.transform(Processor.kt:247)
        at com.android.build.gradle.internal.dependency.JetifyTransform.transform(JetifyTransform.kt:113)
Configuration

Mapbox SDK versions: Android 8.4.0

Dominant language
Java
Stars
242
Forks
116
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapbox/mapbox-plugins-android

All issues in mapbox/mapbox-plugins-android

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.