Questions tagged [android-d8]

D8 is a dexing compiler for Android development.

D8 is a dexing compiler for Android development. It replaces DX.

References

47 questions
30
votes
3 answers

Difference between D8 and R8 android

As android studio introduced two new tools D8 and R8. As per google documentation D8 is a dex tool and R8 is a progourd tool but as their explanation both are doing almost same thing like below: D8 is a dexer that converts java byte code to dex…
0xAliHn
  • 18,390
  • 23
  • 91
  • 111
27
votes
2 answers

How to resolve multiple D8 warnings: was not found, it is required for default or static interface methods desugaring ?

After upgrading to Android Gradle Plugin from 3.1.4 to 3.2.x I'm getting multiple warnings such as: D8: Type `com.google.gson.reflect.TypeToken` was not found, it is required for default or static interface methods desugaring of…
16
votes
5 answers

Firebase performance monitor causing "D8: Unsupported source file type"

I added apply plugin: 'com.google.firebase.firebase-perf' and when I ran build script I got /transforms/FirebasePerformancePlugin/dev/debug/174/module-info.class: D8: Unsupported source file type What kind of problem it could be? I updated…
Gorets
  • 2,434
  • 5
  • 27
  • 45
7
votes
0 answers

Code shrinker R8 crashes my Xamarin.Android app on startup with Unable to get provider com.google.firebase.provider.FirebaseInitProvider

I have a Xamarin.Android app which I recently switched to use R8 code shrinker. Unfortunately, my app is crashing on startup with the following error: java.lang.RuntimeException: Unable to get provider…
6
votes
1 answer

Android R8 Error after updating dependencies

I have updated all of my project dependencies and I'm getting different Errors of R8. AGPBI: {"kind":"error","text":"java.lang.NullPointerException","sources":[{}],"tool":"D8"} org.gradle.workers.WorkerExecutionException: There was a failure while…
Nisar Ahmad
  • 1,987
  • 3
  • 13
  • 30
5
votes
1 answer

Where r8.jar is located inside Android SDK?

I'm trying out Android's D8 and R8. As the documentation says the command to run D8 is the following: java -jar build/libs/d8.jar --release --output out input.jar And for R8: java -jar build/libs/r8.jar --release --output out --pg-conf…
Andrii Lisun
  • 653
  • 4
  • 22
4
votes
0 answers

How do I debug D8 errors like "Type X is referenced as an interface from Y"?

Right now I have a project that has 3 modules, one app module and a streaming module that uses its own base module. When I build this project, it always fails in the app:transformClassesWithDexBuilderForDev2Debug, and it's always…
Gensoukyou1337
  • 1,507
  • 1
  • 13
  • 31
4
votes
0 answers

How to pass flags to D8 tool?

D8 is a command line tool that Android Studio and the Android Gradle Plugin use to compile project's Java bytecode into DEX bytecode. This command has several options : --output path, --file-per-class, --no-desugaring, --main-dex-list etc. I…
ashakirov
  • 12,112
  • 6
  • 40
  • 40
4
votes
0 answers

How to suppress Android D8 build warnings

I recently upgraded to Android Studio 3.2 which enables D8 Desugaring by default. In the build logs, i see lot of warnings related to D8. Could any one guide me on how to suppress these warnings? D8: Interface…
MSD
  • 2,627
  • 1
  • 18
  • 12
4
votes
1 answer

Program type already present: android.support.v7.appcompat.R

I'm facing issue while try to make bundle with following gradle and dependencies project gradle: buildscript { ext.kotlin_version = '1.2.51' repositories { jcenter() maven { url 'https://maven.google.com/' …
4
votes
1 answer

Android Studio 3.1: StackOverflowError when executing task transformClassesWithDexBuilderForDebug when using qoppapdf library

With the update to Android Studio 3.1 our apps' builds started breaking randomly on all machines. On my machine the build breaks with a StackOverflowError during the dexing process. When d8 and desugaring are disabled in gradle.properties the builds…
3
votes
0 answers

Generate desugared library for B4A

I'm making an Android library for B4A framework. Here's the situation: My Android library uses Java8 features (such as Lambda) B4A (Basic4Android) uses legacy dex (instead of d8) to make the apps and thus, incompatible with java8 and will not…
Mahdi-Malv
  • 16,677
  • 10
  • 70
  • 117
3
votes
1 answer

D8 exception when using Square's Wire

After adding Square's Wire library for Protobuf support in an Android project, I'm getting the following D8 exception during compilation: D8: Program type already present:…
Splash
  • 1,310
  • 12
  • 20
2
votes
0 answers

d8: strange exception when using it from command line

Given i added d8.bat to my PATH, I tried to compile a folder of java classes into classes.dex using the modern tool d8 (which replaced dx). However when I followed the example in the documentation, dx *.class I got this error Exception in thread…
Amin Guermazi
  • 1,632
  • 9
  • 19
2
votes
1 answer

Why does Android keep DX when it was replaced by D8?

Why does Android still keep DX along its newer replacement D8? cd cmdline-tools/build-tools/30.0.3 && ls d* Result: d8 dexdump dx Here is the program I used (file Primes.java): class Primes { private static boolean isPrime(int p) { …
OrenIshShalom
  • 5,974
  • 9
  • 37
  • 87
1
2 3 4