Jetifier fails on Mapbox aars when attempting to migrate to AndroidX
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
- Domain
- build-system, mobile
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
- Migrate existing working project to AndroidX
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mapbox/mapbox-plugins-android
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
mapbox/mapbox-plugins-android#1207 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
mapbox/mapbox-plugins-android#1206 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
mapbox/mapbox-plugins-android#1203 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
mapbox/mapbox-plugins-android#1195 · 1 comment · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
mapbox/mapbox-plugins-android#1193 · 1 comment ·
All issues in mapbox/mapbox-plugins-android
Similar issues
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
inu-appcenter/memorIN-backend#288 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
frontend maui-pilot pilot-ask question
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
area/plugin
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
kestra-io/plugin-kestra#190 ·