I'm trying to use the reverse functionality of the jetifier, but it seems I'm stuck due to an unknown error.
I'm running the following command on the standalone jetifier tool (the one embedded in AndroidStudio does not support this feature)
jetifier-standalone -l verbose -r -i jetified.aar -o deJetified.aar
But I'm encountering the following error which doesn't say that much:
Exception in thread "main" java.lang.NullPointerException
at java.nio.file.Files.provider(Files.java:97)
at java.nio.file.Files.createDirectory(Files.java:674)
at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
at java.nio.file.Files.createDirectories(Files.java:727)
at com.android.tools.build.jetifier.processor.archive.Archive.writeSelfToFile(Archive.kt:107)
at com.android.tools.build.jetifier.processor.archive.Archive.writeSelf(Archive.kt:87)
at com.android.tools.build.jetifier.processor.Processor.transform2(Processor.kt:321)
at com.android.tools.build.jetifier.processor.Processor.transform2$default(Processor.kt:251)
at com.android.tools.build.jetifier.standalone.Main.run(Main.kt:156)
at com.android.tools.build.jetifier.standalone.Main$Companion.main(Main.kt:109)
at com.android.tools.build.jetifier.standalone.Main.main(Main.kt)
Did anyone manage to use the reverse functionality of this tool? Does anyone know why does this issue appear? Any fix for this?
PS: the artifact is working as it is published on a nexus, and used as a dependency in a test project.
It seems the output parameter was wrong. It requires a full path.
Changing the command to: jetifier-standalone -l verbose -r -i jetified.aar -o ./deJetified.aar
fixes the issue and the artifact is generated correctly.