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:
New:
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'
}
Upgraded:
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!