APK Generation fails
Description
The app builds well on the simulator when I try to generate the signed APK, I get:
Transform firebase-analytics-impl.aar (com.google.firebase:firebase-analytics-impl:16.0.0) with AarTransform
> Transform full.jar (project :emoji) with DexingTransform
> Task :app:mergeExtDexPlayRelease FAILED
AGPBI: {"kind":"error","text":"Class descriptor \u0027Landroid/support/customtabs/ICustomTabsCallback/;\u0027 cannot be represented in dex format.","sources":[{}],"tool":"D8"}
FAILURE: Build failed with an exception.
- What went wrong: Could not resolve all files for configuration ':app:playReleaseRuntimeClasspath'.
Failed to transform file 'jetified-classes.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=false, dexing-min-sdk=22} using transform DexingTransform Error while dexing.
Devices and Versions
Your Rocket.Chat.Android version: (e.g. 2.1.0) Your Rocket.Chat Server version: (e.g. 0.63.1-develop)
Mobile device model and OS version: (e.g. "Nexus 7 - Android 6.0.1")
Steps to reproduce
Logs
Add the following in your app level gradle file inside android tag and try sync, clean build apk . compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 }
@real19 if you try the above and still no luck, try switching to oracle jdk instead of openjdk and tell us if it all worked fine
Thanks @isanalWipro and @leonardoaramaki . Adding the following worked:
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}