ArchUnit
ArchUnit copied to clipboard
androidx.lifecycle.ViewModelProvider obfuscated by Proguard, then crash
crash log as follow: Exception in thread "main" java.lang.IllegalStateException: Never found a JavaCodeUnit that matches supposed caller CodeUnit{name='a', descriptor=(Z)V, declaringClassName='a.o.a.b$a'} at com.tngtech.archunit.core.importer.AccessRecord$Factory.getCaller(AccessRecord.java:273) at com.tngtech.archunit.core.importer.AccessRecord$Factory.access$400(AccessRecord.java:61) at com.tngtech.archunit.core.importer.AccessRecord$Factory$4.get(AccessRecord.java:262) at com.tngtech.archunit.core.importer.AccessRecord$Factory$4.get(AccessRecord.java:259) at com.tngtech.archunit.thirdparty.com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:167) at com.tngtech.archunit.core.importer.AccessRecord$Factory$RawFieldAccessRecordProcessed.getCaller(AccessRecord.java:222) at com.tngtech.archunit.core.importer.ClassGraphCreator.tryProcess(ClassGraphCreator.java:206) at com.tngtech.archunit.core.importer.ClassGraphCreator.completeAccesses(ClassGraphCreator.java:165) at com.tngtech.archunit.core.importer.ClassGraphCreator.complete(ClassGraphCreator.java:119) at com.tngtech.archunit.core.importer.ClassFileProcessor.process(ClassFileProcessor.java:64) at com.tngtech.archunit.core.importer.ClassFileImporter.importLocations(ClassFileImporter.java:336) at com.transsion.utils.FileUtil.collectJavaClasses(FileUtil.java:214) at com.transsion.utils.FileUtil.collectJavaClasses(FileUtil.java:190) at com.transsion.App.runOnceBeforeClass(App.java:73) at com.transsion.App.main(App.java:36)
the attachment is the class b$a.zip
A brief intermediate result: The exception didn't occurr with ArchUnit 0.22.0, but only since 29dccfe3249ae4a45b2d4e824d7b033a0f67155c.
A brief intermediate result: The exception didn't occurr with ArchUnit 0.22.0, but only since 29dccfe. i use the latest code, but still have the same problem. You test this class is ok?
See https://github.com/TNG/ArchUnit/issues/765#issuecomment-1010736751.