Android Standalone build failed

#1

Can someone help me to understand what’s causing this build failure?
https://expo.io/builds/393a2d8e-f22c-466a-a673-ab718daead47

: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.
BUILD FAILED
3 Likes

#2

Facing this same issue. What happening? ;/

2 Likes

#3

Android build failing here also

2 Likes

#4

+1 experiencing this issue

1 Like

#5

build iOS works well, whereas build android fails. I tried this over ten times but failed. It is likely that this fails continues for over 12 hours.

1 Like

#6

EXPO - Please post this on the Status Board

1 Like

#7

Also getting this error. Sounds like the android build is broken.

1 Like

#8

Same problem here

1 Like

#9

Me too :frowning:

Maybe something happened on Expo server…

1 Like

#10

Can someone please Report this to = https://status.expo.io/

1 Like

#11

How can we add a new accident on status.expo.io? A special account?

1 Like

#12

have you guys experienced the same error as this -> “android-shell-app” errored, im using the stand alone android build too :frowning:

0 Likes

#13

+1 same problem

0 Likes

#14

I am experiencing this issue just now. Has anyone got any update ?

0 Likes

#15

Hi, we’re really sorry about this. We’re deploying a fix right now, which should be available soon. You can see updates at https://status.expo.io/ . Let us know if you continue to have issues after the fix is deployed!

2 Likes

#16

Now android build works well.

0 Likes

#17

Hi esamelson, thanks for ur fast respon. Now it works!!! Many Thanks

0 Likes

#18

How do I fix this for a detached app? Same error. I don’t see any new version of the expo package available, still 28.0.0. Thanks for your speedy response thus far.

0 Likes

Exp build:android failed.
Android Studio Building Ubuntu Return code 1 for dex process
Gulp Task Error
#19

Hi @rmaniar - you should be able to fix this yourself by changing the lottie dependency from 2.5.+ to 2.5.5 in android/app/build.gradle. We’ll put out an expokit update shortly.

1 Like

Android Studio Building Ubuntu Return code 1 for dex process
#20

I also had to change android/maven/host/exp/exponent/expoview/28.0.0/expoview-28.0.0.pom and (maybe?) ivy-28.0.0.xml

1 Like