首页 > 其他分享 >androidX jetifier - 有没有办法忽略jetifying .JAR?

androidX jetifier - 有没有办法忽略jetifying .JAR?

时间:2022-12-11 19:13:00浏览次数:75  
标签:ClassReader androidX tools JAR jetifier build android com

androidX jetifier - 有没有办法忽略jetifying .JAR?

Mar*_*ann  9 android androidx android-jetifier

 

尝试将我的应用程序更新为androidX依赖项。按照此处的说明进行操作,编译失败。错误来自JetifyTransform任务无法处理某个 .JAR 依赖项(仅供参考 -三星 Spass SDK):

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:kaptGenerateStubsStandardNo_vendorDebugKotlin'.
> Could not resolve all artifacts for configuration ':app:standardNo_vendorDebugCompileClasspath'.
   > Failed to transform file 'pass-v1.2.2.jar' to match attributes {artifactType=processed-jar} using transform JetifyTransform
      > Failed to transform '/Users/hanandann/StudioProjects/ArnakPaymentsAndroid/Payments/app/libs/pass-v1.2.2.jar' using Jetifier. Reason: null. (Run with --stacktrace for more details.)
   > Failed to transform file 'pass-v1.2.2.jar' to match attributes {artifactType=processed-jar} using transform JetifyTransform
      > Failed to transform '/Users/hanandann/StudioProjects/ArnakPaymentsAndroid/Payments/app/libs/pass-v1.2.2.jar' using Jetifier. Reason: null. (Run with --stacktrace for more details.)

尝试使用jetifier-standalone工具jetify有类似的结果:

Hanans-MacBook-Pro:bin hanandann$ ./jetifier-standalone -i /Users/hanandann/StudioProjects/.../app/libs/pass-v1.2.2.jar -o /Users/hanandann/StudioProjects/.../app/libs/pass-v1.2.2jet.jar 
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 8
    at org.objectweb.asm.ClassReader.readFrameType(ClassReader.java:2313)
    at org.objectweb.asm.ClassReader.readFrame(ClassReader.java:2269)
    at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1448)
    at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1126)
    at org.objectweb.asm.ClassReader.accept(ClassReader.java:698)
    at org.objectweb.asm.ClassReader.accept(ClassReader.java:500)
    at com.android.tools.build.jetifier.processor.transform.bytecode.ByteCodeTransformer.runTransform(ByteCodeTransformer.kt:39)
    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.transformLibrary(Processor.kt:421)
    at com.android.tools.build.jetifier.processor.Processor.transform(Processor.kt:247)
    at com.android.tools.build.jetifier.processor.Processor.transform$default(Processor.kt:234)
    at com.android.tools.build.jetifier.standalone.Main.run(Main.kt:157)
    at com.android.tools.build.jetifier.standalone.Main$Companion.main(Main.kt:109)
    at com.android.tools.build.jetifier.standalone.Main.main(Main.kt)

现在,我真的不介意SDK的没有得到jetified,所以我试图设置android.enableJetifier=false在我的gradle.properties文件,但编辑再为不同的reason-失败SupportMapFragment是不兼容androidX还为报道这里

所以我被困住了。使用 jetify,.JAR 不会转换。与它 - SupportMapFarg 不兼容。

有什么建议?

PS你知道什么会很好吗?如果有ignore喷射功能的选项

 

Mar*_*ann  11

 

将此添加到gradle.properties

android.jetifier.blacklist = pass

乡亲的建议谷歌在这里

请注意 - 此功能是实验性的,不受支持。

 

 

标签:ClassReader,androidX,tools,JAR,jetifier,build,android,com
From: https://www.cnblogs.com/sexintercourse/p/16974186.html

相关文章