Gulp Task Error

#1

The above link is what I keep getting every time I submit a build to expo android. I am pushing the same code that was previously built correctly. It fails on gulp task every time and gives this error.

[stderr] [00:19:39] ‘android-shell-app’ errored after 11 min
[stderr] [00:19:39] Error: Process exited with non-zero code: 1
[stderr] at ChildProcess.child.on (/src/exponent/tools-public/node_modules/@expo/spawn-async/build/spawnAsync.js:39:21)
[stderr] at emitTwo (events.js:125:13)
[stderr] at ChildProcess.emit (events.js:213:7)
[stderr] at maybeClose (internal/child_process.js:927:16)
[stderr] at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

Has anyone else experienced this. Please help!! I have spent hours on this now.

#2

Also getting this error:

[stderr] /src/exponent/android-shell-app/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/AlertFragment.java:37: Error: Avoid non-default constructors in fragments: use a default constructor plus Fragment#setArguments(Bundle) instead [ValidFragment]
[stderr] public AlertFragment(@Nullable DialogModule.AlertFragmentListener listener, Bundle arguments) {
[stderr] ~~~~~~~~~~~~~
[stderr] /src/exponent/android-shell-app/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/SupportAlertFragment.java:30: Error: Avoid non-default constructors in fragments: use a default constructor plus Fragment#setArguments(Bundle) instead [ValidFragment]
[stderr] public SupportAlertFragment(@Nullable DialogModule.AlertFragmentListener listener, Bundle arguments) {
[stderr] ~~~~~~~~~~~~~~~~~~~~
[stderr] Explanation for issues of type “ValidFragment”:
[stderr] From the Fragment documentation:
[stderr] Every fragment must have an empty constructor, so it can be instantiated
[stderr] when restoring its activity’s state. It is strongly recommended that
[stderr] subclasses do not have other constructors with parameters, since these
[stderr] constructors will not be called when the fragment is re-instantiated;
[stderr] instead, arguments can be supplied by the caller with setArguments(Bundle)
[stderr] and later retrieved by the Fragment with getArguments().
[stderr] http://developer.android.com/reference/android/app/Fragment.html#Fragment()
[stderr] 2 errors, 0 warnings
:app:transformClassesWithMultidexlistForProdRelease
:app:transformClassesWithDexForProdRelease
[stderr] Dex: Error converting bytecode to dex:
[stderr] Cause: Dex cannot parse version 52 byte code.
[stderr] This is caused by library dependencies that have been compiled using Java 8 or above.
[stderr] If you are using the ‘java’ gradle plugin in a library submodule add
[stderr] targetCompatibility = ‘1.7’
[stderr] sourceCompatibility = ‘1.7’
[stderr] to that submodule’s build.gradle file.
[stderr] UNEXPECTED TOP-LEVEL EXCEPTION:
[stderr] java.lang.RuntimeException: Exception parsing classes
[stderr] at com.android.dx.command.dexer.Main.processClass(Main.java:781)
[stderr] at com.android.dx.command.dexer.Main.processFileBytes(Main.java:747)
[stderr] at com.android.dx.command.dexer.Main.access$1200(Main.java:88)
[stderr] at com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1689)
[stderr] at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
[stderr] at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
[stderr] at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
[stderr] at com.android.dx.command.dexer.Main.processOne(Main.java:695)
[stderr] at com.android.dx.command.dexer.Main.processAllFiles(Main.java:560)
[stderr] at com.android.dx.command.dexer.Main.runMultiDex(Main.java:376)
[stderr] at com.android.dx.command.dexer.Main.run(Main.java:290)
[stderr] at com.android.builder.internal.compiler.DexWrapper.run(DexWrapper.java:54)
[stderr] at com.android.builder.core.DexByteCodeConverter.lambda$dexInProcess$0(DexByteCodeConverter.java:174)
[stderr] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[stderr] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[stderr] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[stderr] at java.lang.Thread.run(Thread.java:748)
[stderr] Caused by: com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
[stderr] at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:476)
[stderr] at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
[stderr] at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
[stderr] at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
[stderr] at com.android.dx.command.dexer.Main.parseClass(Main.java:793)
[stderr] at com.android.dx.command.dexer.Main.access$1600(Main.java:88)
[stderr] at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1728)
[stderr] at com.android.dx.command.dexer.Main.processClass(Main.java:779)
[stderr] … 16 more
[stderr]
[stderr] Dex: Error converting bytecode to dex:
[stderr] Cause: Dex cannot parse version 52 byte code.
[stderr] This is caused by library dependencies that have been compiled using Java 8 or above.
[stderr] If you are using the ‘java’ gradle plugin in a library submodule add
[stderr] targetCompatibility = ‘1.7’
[stderr] sourceCompatibility = ‘1.7’
[stderr] to that submodule’s build.gradle file.
[stderr] UNEXPECTED TOP-LEVEL EXCEPTION:
[stderr] java.lang.RuntimeException: Exception parsing classes
[stderr] at com.android.dx.command.dexer.Main.processClass(Main.java:781)
[stderr] at com.android.dx.command.dexer.Main.processFileBytes(Main.java:747)
[stderr] at com.android.dx.command.dexer.Main.access$1200(Main.java:88)
[stderr] at com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1689)
[stderr] at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
[stderr] at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
[stderr] at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
[stderr] at com.android.dx.command.dexer.Main.processOne(Main.java:695)
[stderr] at com.android.dx.command.dexer.Main.processAllFiles(Main.java:587)
[stderr] at com.android.dx.command.dexer.Main.runMultiDex(Main.java:376)
[stderr] at com.android.dx.command.dexer.Main.run(Main.java:290)
[stderr] at com.android.builder.internal.compiler.DexWrapper.run(DexWrapper.java:54)
[stderr] at com.android.builder.core.DexByteCodeConverter.lambda$dexInProcess$0(DexByteCodeConverter.java:174)
[stderr] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[stderr] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[stderr] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[stderr] at java.lang.Thread.run(Thread.java:748)
[stderr] Caused by: com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
[stderr] at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:476)
[stderr] at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
[stderr] at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
[stderr] at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
[stderr] at com.android.dx.command.dexer.Main.parseClass(Main.java:793)
[stderr] at com.android.dx.command.dexer.Main.access$1600(Main.java:88)
[stderr] at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1728)
[stderr] at com.android.dx.command.dexer.Main.processClass(Main.java:779)
[stderr] … 16 more
[stderr]
[stderr] 2 errors; aborting
FAILED
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ‘:app:transformClassesWithDexForProdRelease’.
[stderr] > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Return code 1 for dex process
[stderr] * Try:
[stderr] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

#3

@kyle.paulson is this still happening on builds you’re starting now? We had an incident this weekend in which all builds would fail with this error, but a fix was deployed Saturday evening PDT.

#4

Its not happening anymore. I tried to close my ticket but it wouldn’t let me. Thanks for checking in though. I appreciate what you guys have made and am really impressed with Expo.

1 Like
#5
closed #6

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.