由于 retrolambda 问题,无法构建 CN1 应用程序

Building CN1 app doesn't work due to problem with retrolambda

我的应用程序将不再为 iPhone 和 Android 构建,显然是由于 retrolambda 的问题。

我已经有一段时间没有构建了(我想是 6-7 个月),但我不认为我的应用程序使用 lambda 函数的方式发生了重大变化(但我可能是错的,因为我没有确定如何阅读错误消息),所以我想知道 CN1 构建过程中是否发生了某些变化?

如果没有,任何关于如何 'decode' 下面的错误日志来理解问题的帮助都会非常有用。我想我已经确定了有问题的代码,但它的编写方式似乎与之前编译成功的方式相同。

Executing: /usr/local/bin/pod --version Process return code is 0
Pods version: 1.10.0

User-level: 1000
Request Args: 
-----------------
ios.background_modes=fetch
ios.multitasking=true
java.version=8
ios.project_type=ios
ios.testFlight=true
android.multidex=true
ios.statusbar_hidden=false
ios.application_exits=false
desktop.theme=iOS7Theme
ios.includePush=false
ios.buildType=debug
ios.interface_orientation=UIInterfaceOrientationPortrait:UIInterfaceOrientationPortraitUpsideDown:UIInterfaceOrientationLandscapeLeft:UIInterfaceOrientationLandscapeRight
ios.newStorageLocation=true
ios.enableBadgeClear=false
android.release=true
android.debug=false
-------------------
OS Version: 10.15.3
Executing: /Applications/Xcode11.3.app/Contents/Developer/usr/bin/xcodebuild -version Process return code is 0
Result is Xcode 11.3.1
Build version 11C505

Xcode version line matching pattern: Xcode 11.3.1
Executing: /Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/bin/java -Dretrolambda.inputDir=/Volumes/MacintoshHD2/temp/build4429909335558849128xxx/classes -Dretrolambda.classpath=/Volumes/MacintoshHD2/temp/build4429909335558849128xxx/classes:/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/temp3257553847769871116.jar -Dretrolambda.outputDir=/Volumes/MacintoshHD2/temp/build4429909335558849128xxx/classes_retrolamda -Dretrolambda.bytecodeVersion=49 -Dretrolambda.defaultMethods=true -jar /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/temp5326134886678924546.jar Retrolambda 2.5.1
00:00  INFO: Bytecode version: 49 (Java 5)
00:00  INFO: Default methods:  true
00:00  INFO: Input directory:  /Volumes/MacintoshHD2/temp/build4429909335558849128xxx/classes
00:00  INFO: Output directory: /Volumes/MacintoshHD2/temp/build4429909335558849128xxx/classes_retrolamda
00:00  INFO: Classpath:        [/Volumes/MacintoshHD2/temp/build4429909335558849128xxx/classes, /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/temp3257553847769871116.jar]
00:00  INFO: Included files:   all
00:00  INFO: Agent enabled:    false
00:00  INFO: Saving lambda class: com/MyApp/MyApp/MyCheckBox$$Lambda
00:00  INFO: Saving lambda class: com/MyApp/MyApp/MyCheckBox$$Lambda
00:00  INFO: Saving lambda class: com/MyApp/MyApp/MyCheckBox$$Lambda
00:00  INFO: Saving lambda class: com/MyApp/MyApp/MyCheckBox$$Lambda
00:00  INFO: Saving lambda class: com/MyApp/MyApp/MyCheckBox$$Lambda
00:00  INFO: Saving lambda class: com/MyApp/MyApp/MyCheckBox$$Lambda
00:00  INFO: Saving lambda class: com/MyApp/MyApp/MyCheckBox$$Lambda
00:00  INFO: Saving lambda class: com/MyApp/MyApp/MyDateAndTimePicker$$Lambda
00:00 ERROR: Failed to run Retrolambda
java.lang.RuntimeException: Failed to backport class: com/MyApp/MyApp/ScreenListOfItemLists
    at net.orfjackal.retrolambda.Transformers.transform(Transformers.java:129)
    at net.orfjackal.retrolambda.Transformers.transform(Transformers.java:107)
    at net.orfjackal.retrolambda.Transformers.backportClass(Transformers.java:47)
    at net.orfjackal.retrolambda.Retrolambda.run(Retrolambda.java:83)
    at net.orfjackal.retrolambda.Main.main(Main.java:28)
Caused by: java.lang.RuntimeException: Failed to backport lambda or method reference: com/MyApp/MyApp/ScreenListOfItemLists.lambda$addCommandsToToolbar(Lcom/codename1/ui/events/ActionEvent;)V (7)
    at net.orfjackal.retrolambda.lambdas.LambdaReifier.reifyLambdaClass(LambdaReifier.java:42)
    at net.orfjackal.retrolambda.lambdas.BackportLambdaInvocations$InvokeDynamicInsnConverter.backportLambda(BackportLambdaInvocations.java:187)
    at net.orfjackal.retrolambda.lambdas.BackportLambdaInvocations$InvokeDynamicInsnConverter.visitInvokeDynamicInsn(BackportLambdaInvocations.java:176)
    at net.orfjackal.retrolambda.asm.ClassReader.readCode(ClassReader.java:1519)
    at net.orfjackal.retrolambda.asm.ClassReader.readMethod(ClassReader.java:1032)
    at net.orfjackal.retrolambda.asm.ClassReader.accept(ClassReader.java:708)
    at net.orfjackal.retrolambda.asm.ClassReader.accept(ClassReader.java:521)
    at net.orfjackal.retrolambda.Transformers.lambda$transform(Transformers.java:107)
    at net.orfjackal.retrolambda.Transformers.transform(Transformers.java:125)
    ... 4 more
Caused by: java.lang.IllegalAccessException: no such method: com.MyApp.MyApp.ScreenListOfItemLists.lambda$addCommandsToToolbar(ActionEvent)void/invokeSpecial
    at java.lang.invoke.MemberName.makeAccessException(MemberName.java:867)
    at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1003)
    at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:1386)
    at java.lang.invoke.MethodHandles$Lookup.findSpecial(MethodHandles.java:1004)
    at net.orfjackal.retrolambda.lambdas.Types.toMethodHandle(Types.java:53)
    at net.orfjackal.retrolambda.lambdas.Types.asmToJdkType(Types.java:26)
    at net.orfjackal.retrolambda.lambdas.LambdaReifier.callBootstrapMethod(LambdaReifier.java:106)
    at net.orfjackal.retrolambda.lambdas.LambdaReifier.reifyLambdaClass(LambdaReifier.java:37)
    ... 12 more
Caused by: java.lang.NoClassDefFoundError: com/parse4cn1/ParseObject
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access0(URLClassLoader.java:73)
    at java.net.URLClassLoader.run(URLClassLoader.java:368)
    at java.net.URLClassLoader.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at net.orfjackal.retrolambda.NonDelegatingClassLoader.loadClass(NonDelegatingClassLoader.java:25)
    at java.lang.invoke.MethodHandleNatives.resolve(Native Method)
    at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:975)
    at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1000)
    ... 18 more
Caused by: java.lang.ClassNotFoundException: com.parse4cn1.ParseObject
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at net.orfjackal.retrolambda.NonDelegatingClassLoader.loadClass(NonDelegatingClassLoader.java:27)
    ... 31 more
Process return code is 1

这在 retro-lambda 阶段失败了,但与此无关。看到这个错误:

Caused by: java.lang.ClassNotFoundException: com.parse4cn1.ParseObject
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at net.orfjackal.retrolambda.NonDelegatingClassLoader.loadClass(NonDelegatingClassLoader.java:27)
    ... 31 more

ParseObject 从您的构建中丢失。如果项目中存在 build、bin、target 和 dist 目录,请尝试删除它们。似乎有一个没有正确包含的依赖项。还要确保您没有以任何方式更改类路径。