mit-cml / appinventor-sources

MIT App Inventor Public Open Source
http://appinventor.mit.edu/appinventor-sources/
Apache License 2.0
1.5k stars 2.08k forks source link

Build Ant PlayApp - ERROR: DX returned an error code! #3244

Closed pitekkate closed 1 month ago

pitekkate commented 1 month ago

Build Ant PlayApp Error!

`` [java] [java] PARSE ERROR: [java] InvokeDynamic not supported [java] ...while preparsing cst 0047 at offset 00000144 [java] ...while parsing androidx/core/app/ActivityCompat.class ....... [java] 1 error; aborting [java] [RunMultidex] ERROR: DX returned an error code [java] [RunMultidex] Task errored in 29.325 seconds

BUILD FAILED /home/runner/work/appinventor-sources/appinventor-sources/appinventor/build.xml:90: The following error occurred while executing this line: /home/runner/work/appinventor-sources/appinventor-sources/appinventor/buildserver/build.xml:204: Java returned: 1

``

and i see warning AndroidRuntime:AndroidRuntime:

2024-09-28T18:03:38.5114870Z [mkdir] Created dir: /home/runner/work/appinventor-sources/appinventor-sources/appinventor/components/build/classes/AndroidRuntime 2024-09-28T18:03:38.5572830Z [javac] Compiling 376 source files to /home/runner/work/appinventor-sources/appinventor-sources/appinventor/components/build/classes/AndroidRuntime 2024-09-28T18:03:40.4268541Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:40.4273841Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:40.4282645Z [javac] warning: unknown enum constant AnnotationRetention.BINARY 2024-09-28T18:03:40.4290326Z [javac] reason: class file for kotlin.annotation.AnnotationRetention not found 2024-09-28T18:03:40.4291631Z [javac] warning: unknown enum constant AnnotationTarget.CLASS 2024-09-28T18:03:40.4295358Z [javac] reason: class file for kotlin.annotation.AnnotationTarget not found 2024-09-28T18:03:40.4301078Z [javac] warning: unknown enum constant AnnotationTarget.PROPERTY 2024-09-28T18:03:40.4302419Z [javac] warning: unknown enum constant AnnotationTarget.LOCAL_VARIABLE 2024-09-28T18:03:40.4303731Z [javac] warning: unknown enum constant AnnotationTarget.VALUE_PARAMETER 2024-09-28T18:03:40.4304958Z [javac] warning: unknown enum constant AnnotationTarget.CONSTRUCTOR 2024-09-28T18:03:40.4306037Z [javac] warning: unknown enum constant AnnotationTarget.FUNCTION 2024-09-28T18:03:40.4307274Z [javac] warning: unknown enum constant AnnotationTarget.PROPERTY_GETTER 2024-09-28T18:03:40.4308497Z [javac] warning: unknown enum constant AnnotationTarget.PROPERTY_SETTER 2024-09-28T18:03:40.4309853Z [javac] warning: unknown enum constant AnnotationTarget.FILE 2024-09-28T18:03:40.4311006Z [javac] warning: unknown enum constant AnnotationTarget.TYPEALIAS 2024-09-28T18:03:40.4313411Z [javac] Note: Wrote file file:/home/runner/work/appinventor-sources/appinventor-sources/appinventor/components/build/classes/AndroidRuntime/simple_components.json 2024-09-28T18:03:40.4316170Z [javac] Note: Wrote file file:/home/runner/work/appinventor-sources/appinventor-sources/appinventor/components/build/classes/AndroidRuntime/simple_components.txt 2024-09-28T18:03:40.4319446Z [javac] Note: Wrote file file:/home/runner/work/appinventor-sources/appinventor-sources/appinventor/components/build/classes/AndroidRuntime/simple_components_build_info.json 2024-09-28T18:03:40.4322701Z [javac] Note: Wrote file file:/home/runner/work/appinventor-sources/appinventor-sources/appinventor/components/build/classes/AndroidRuntime/AutogeneratedOdeMessages.java 2024-09-28T18:03:40.4325838Z [javac] Note: Wrote file file:/home/runner/work/appinventor-sources/appinventor-sources/appinventor/components/build/classes/AndroidRuntime/ComponentsTranslation.java 2024-09-28T18:03:40.6659441Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:40.6661360Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:40.6663808Z [javac] warning: unknown enum constant AnnotationRetention.BINARY 2024-09-28T18:03:40.6665694Z [javac] reason: class file for kotlin.annotation.AnnotationRetention not found 2024-09-28T18:03:40.6667395Z [javac] warning: unknown enum constant AnnotationTarget.CLASS 2024-09-28T18:03:40.6672109Z [javac] reason: class file for kotlin.annotation.AnnotationTarget not found 2024-09-28T18:03:40.6673419Z [javac] warning: unknown enum constant AnnotationTarget.PROPERTY 2024-09-28T18:03:40.6674658Z [javac] warning: unknown enum constant AnnotationTarget.LOCAL_VARIABLE 2024-09-28T18:03:40.6675908Z [javac] warning: unknown enum constant AnnotationTarget.VALUE_PARAMETER 2024-09-28T18:03:40.6677110Z [javac] warning: unknown enum constant AnnotationTarget.CONSTRUCTOR 2024-09-28T18:03:40.6678286Z [javac] warning: unknown enum constant AnnotationTarget.FUNCTION 2024-09-28T18:03:40.6679696Z [javac] warning: unknown enum constant AnnotationTarget.PROPERTY_GETTER 2024-09-28T18:03:40.6680906Z [javac] warning: unknown enum constant AnnotationTarget.PROPERTY_SETTER 2024-09-28T18:03:40.6682114Z [javac] warning: unknown enum constant AnnotationTarget.FILE 2024-09-28T18:03:40.6683272Z [javac] warning: unknown enum constant AnnotationTarget.TYPEALIAS 2024-09-28T18:03:40.8433197Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:40.8739749Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:40.8741393Z [javac] warning: unknown enum constant AnnotationRetention.BINARY 2024-09-28T18:03:40.8743012Z [javac] reason: class file for kotlin.annotation.AnnotationRetention not found 2024-09-28T18:03:40.8744601Z [javac] warning: unknown enum constant AnnotationTarget.CLASS 2024-09-28T18:03:40.8746008Z [javac] reason: class file for kotlin.annotation.AnnotationTarget not found 2024-09-28T18:03:40.8747409Z [javac] warning: unknown enum constant AnnotationTarget.PROPERTY 2024-09-28T18:03:40.8748937Z [javac] warning: unknown enum constant AnnotationTarget.LOCAL_VARIABLE 2024-09-28T18:03:40.8750528Z [javac] warning: unknown enum constant AnnotationTarget.VALUE_PARAMETER 2024-09-28T18:03:40.8752668Z [javac] warning: unknown enum constant AnnotationTarget.CONSTRUCTOR 2024-09-28T18:03:40.8754277Z [javac] warning: unknown enum constant AnnotationTarget.FUNCTION 2024-09-28T18:03:40.8756415Z [javac] warning: unknown enum constant AnnotationTarget.PROPERTY_GETTER 2024-09-28T18:03:40.8758819Z [javac] warning: unknown enum constant AnnotationTarget.PROPERTY_SETTER 2024-09-28T18:03:40.8760246Z [javac] warning: unknown enum constant AnnotationTarget.FILE 2024-09-28T18:03:40.8761290Z [javac] warning: unknown enum constant AnnotationTarget.TYPEALIAS 2024-09-28T18:03:43.0768453Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0777426Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0778859Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0781579Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0785117Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0786230Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0787293Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0788408Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0789633Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0790642Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0791748Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0792826Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0794147Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0795445Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0796807Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0798975Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0800340Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.0801361Z [javac] warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX 2024-09-28T18:03:43.1007194Z [javac] Note: Some input files use or override a deprecated API. 2024-09-28T18:03:43.1024705Z [javac] Note: Recompile with -Xlint:deprecation for details. 2024-09-28T18:03:43.1027319Z [javac] Note: Some input files use unchecked or unsafe operations. 2024-09-28T18:03:43.1028601Z [javac] Note: Recompile with -Xlint:unchecked for details. 2024-09-28T18:03:43.1029768Z [javac] 57 warnings 2024-09-28T18:03:43.1032149Z [javac] Creating empty /home/runner/work/appinventor-sources/appinventor-sources/appinventor/components/build/classes/AndroidRuntime/com/google/appinventor/components/runtime/util/package-info.class 2024-09-28T18:03:43.1036862Z [javac] Creating empty /home/runner/work/appinventor-sources/appinventor-sources/appinventor/components/build/classes/AndroidRuntime/com/google/appinventor/components/annotations/androidmanifest/package-info.class 2024-09-28T18:03:43.1041550Z [javac] Creating empty /home/runner/work/appinventor-sources/appinventor-sources/appinventor/components/build/classes/AndroidRuntime/com/google/appinventor/components/runtime/collect/package-info.class 2024-09-28T18:03:43.1046074Z [javac] Creating empty /home/runner/work/appinventor-sources/appinventor-sources/appinventor/components/build/classes/AndroidRuntime/com/google/appinventor/components/annotations/package-info.class 2024-09-28T18:03:43.1050494Z [javac] Creating empty /home/runner/work/appinventor-sources/appinventor-sources/appinventor/components/build/classes/AndroidRuntime/com/google/appinventor/components/runtime/package-info.class 2024-09-28T18:03:43.1054614Z [javac] Creating empty /home/runner/work/appinventor-sources/appinventor-sources/appinventor/components/build/classes/AndroidRuntime/com/google/appinventor/components/runtime/errors/package-info.class 2024-09-28T18:03:43.1253566Z [jar] Building jar: /home/runner/work/appinventor-sources/appinventor-sources/appinventor/build/components/AndroidRuntime.jar 2024-09-28T18:03:43.3312845Z [copy] Copying 3 files to /home/runner/work/appinventor-sources/appinventor-sources/appinventor/build/components 2024-09-28T18:03:43.3326497Z [mkdir] Created dir: /home/runner/work/appinventor-sources/appinventor-sources/appinventor/build/components/ComponentTranslation/src/com/google/appinventor/client 2024-09-28T18:03:43.3333861Z [copy] Copying 2 files to /home/runner/work/appinventor-sources/appinventor-sources/appinventor/build/components/ComponentTranslation/src/com/google/appinventor/client 2024-09-28T18:03:43.3359092Z [copy] Copying 13 files to /home/runner/work/appinventor-sources/appinventor-sources/appinventor/docs/markdown/reference/components 2024-09-28T18:03:43.3397566Z

Affects

Log Build Error build

pitekkate commented 1 month ago

I have build appinventor source with seetup jdk 11 succees. `` [java] [RunZipAlign] Task succeeded in 0.086 seconds [java] [RunApkSigner] Starting Task [java] [RunApkSigner] Task succeeded in 0.842 seconds

BUILD SUCCESSFUL ``

and try back used jdk 8 ,get failed again .

`[java] [RunMultidex] ERROR: DX returned an error code [java] [RunMultidex] Task errored in 30.659 seconds [java] 1 error; aborting

BUILD FAILED`

ewpatton commented 1 month ago

When switching to Java 8, do you perform an ant clean first? Otherwise, you will have class files compiled with Java 11 that won't be usable by earlier versions of Java.