ExpoKit project first ejected on SDK 29 seems quite different from one upgraded from 28 to 29


I detached on SDK 28 and now I’m performing my first upgrade on SDK 29 using the instructions here, including the 28-to-29 specific steps. I ran into an error when building a release copy for the first time on SDK 29 (my question isn’t about this error in particular, but here it is anyway):

Copying resources from program jar [/Users/keith/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp-ws/3.4.1/8ace66ef7002d98f633377c9e67daeeb196d8c3b/okhttp-ws-3.4.1.jar] (filtered)
Warning: Exception while processing task java.io.IOException: Can't write [/Users/keith/Github/nudge-mobile-v4/android/app/build/intermediates/transforms/proguard/dev19/release/jars/3/1f/main.jar] (Can't read [/Users/keith/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp-ws/3.4.1/8ace66ef7002d98f633377c9e67daeeb196d8c3b/okhttp-ws-3.4.1.jar(;;;;;;**.class)] (Duplicate zip entry [okhttp-ws-3.4.1.jar:okhttp3/internal/ws/RealWebSocket$1.class]))
:app:transformClassesAndResourcesWithProguardForDev19Release FAILED

To try to debug this error, I ran expo init (BTW, new expo-cli is awesome so far!) and then expo detach to create a new test project. I noticed several differences in the project files between my freshly-detached SDK 29 project, and my existing project that was upgraded from 28-to-29:

  • Gradle version is set to 4.4 in the new app. It was 3.3 in the upgraded app. Being on 4.4 would be helpful for some native modules, like react-native-firebase.
  • app/build.gradle has different product flavors (no more dev19 in the new one)
  • ExpoView dependency is different:


 implementation('host.exp.exponent:expoview:29.0.0@aar') {
    transitive = true
    exclude group: 'com.squareup.okhttp3', module: 'okhttp'
    exclude group: 'com.squareup.okhttp3', module: 'okhttp-urlconnection'


 compile('host.exp.exponent:expoview:29.0.0@aar') {
    transitive = true

(those exclude bits come up frequently when I google the error I got while building)

  • VERSION_NAME in AppConstants.java is 2.6.4 in the upgraded project and 2.7.1 in the new one. Seemed curious because the iOS instructions say to upgrade a similar-looking version number.

Anyway, wondering if perhaps some steps are missing, or if all of these are meaningless differences. Thanks!


Just an update… I did go ahead and create an SDK 29 project, eject it, and merged the ejected bits into my main project. This resolved my build error. I am still curious if I should be doing this on all upgrades (it’s a fairly complicated thing to do, especially since I have to reapply most of my customizations) or if the simplified upgrade instructions in the docs should generally be OK.


Hey @llamaluvr - sorry for the trouble here. Generally the simplified instructions should be fine, but with SDK 29 we made a significant change to the structure of detached projects so that’s why things were a bit more complicated. It sounds like we missed a few extra steps, so we’ll look into this and get the docs updated. Thanks very much for your update/feedack!


I did the same thing. I copied in the whole android folder from a newly ejected blank app, then copied in the src folder from what was there before, and messed around with it until things built properly. Not super elegant, but like you, I got it working.

closed #5

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