Rocket.Chat.Android icon indicating copy to clipboard operation
Rocket.Chat.Android copied to clipboard

APK Generation fails

Open real19 opened this issue 8 years ago • 3 comments

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

real19 avatar Oct 28 '18 17:10 real19

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 }

isanalWipro avatar Oct 29 '18 09:10 isanalWipro

@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

leonardoaramaki avatar Oct 29 '18 13:10 leonardoaramaki

Thanks @isanalWipro and @leonardoaramaki . Adding the following worked:

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

real19 avatar Oct 29 '18 18:10 real19