question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incompatibility with recent Gradle verisons

See original GitHub issue

Goals

To compile a project with updated SDK and Gradle versions

Expected Results

The project is compiled

Actual Results

Build error

> Configure project :realm
Configuration 'compile' in project ':realm' is deprecated. Use 'implementation' instead.

FAILURE: Build failed with an exception.


* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

Steps to Reproduce

  1. Update Android SDK versions
  2. Update gradle versions

Version of Realm and Tooling

  • Realm JS SDK Version: 2.2.7 (2.3.3)
  • Node or React Native: RN 0.52.0 (0.55.0)
  • Client OS & Version: Android 27
  • Which debugger for React Native: Chrome

– Additional version info:

  • compileSdkVersion 27

  • buildToolsVersion “27.0.3”

  • com.android.support:appcompat-v7:27.1.0

  • gradle-wrapper.properties:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cmelchiorcommented, Aug 13, 2018

@saschak42 It seems I somehow tested the wrong thing. I can reproduce the isse with the last canary build of Android Studio. I’ll reopen and create a fix.

0reactions
saschak42commented, Aug 13, 2018

We’ve tried Android Studio 3.1.4 and 3.2 Beta 5. With the Android Gradle plugin 3.0.0 and higher you don’t need to specify a buildToolsVerson (see https://developer.android.com/studio/releases/build-tools). We also use implementation/api for a while.

The problem is that the Realm build.gradle file uses compile instead of implementation: https://github.com/realm/realm-js/blob/master/react-native/android/build.gradle

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incompatible gradle versions - Android - Stack Overflow
Try to use the same version of the same type of dependencies. e.g: all dependencies of com.google.android.gms:play-services... · use the latest ...
Read more >
Compatibility Matrix - Gradle User Manual
For older Gradle versions, please see the table below which Java version is supported by which Gradle release. Table 1. Java Compatibility. Java...
Read more >
GradleCompatible: Incompatible Gradle Versions
One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a...
Read more >
Gradle Enterprise version compatibility
Major or minor version updates to the Gradle Enterprise Gradle plugin indicate a compatibility change with Gradle Enterprise (e.g. 3.0 → 3.1 or...
Read more >
Android Gradle plugin release notes - Android Developers
However this might fail in some cases, for example if you've just updated AGP and it's no longer compliant with the current Gradle...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found