How to avoid Gradle build failure with OpenTok Android SDK 2.22.0+ How to avoid Gradle build failure with OpenTok Android SDK 2.22.0+

How to avoid Gradle build failure with OpenTok Android SDK 2.22.0+

Maria Scieranska

Objective

You may see Gradle sync fails with OpenTok Android SDK 2.22.0+ with the following error:

Null extracted folder for artifact: ResolvedArtifact(componentIdentifier=com.vonage:webrtc:84.0.20, variant=com.vonage:webrtc:84.0.20 configuration compile, variantName=null, artifactFile=/Users/ydumburs/.gradle/caches/modules-2/files-2.1/com.vonage/webrtc/84.0.20/693d4c04eea690be174ecd0d60dd80aa19456dd9/webrtc-84.0.20.aar, extractedFolder=null, dependencyType=ANDROID, isWrappedModule=false, buildMapping={__current_build__=/Users/ydumburs/Documents/GitHub_local/Vonage/Android/MyApplication})

This is because there was Gradle memory increase in OpenTok Android SDK 2.22.0, which can result in the application size increasing by 2x and if the Gradle memory limit is not increased, one of the build phases can fail. 

Applies To

  • Vonage Video API
  • OpenTok Android SDK 2.22.0, 2.22.1, and 2.22.2

Procedure

  1. Open the gradle.properties on Android Studio
  2. Change "org.gradle.jvmargs=-Xmx2048m" to "org.gradle.jvmargs=-Xmx4096m"