Questions tagged [android-d8]

37 questions
25
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…
19
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
  • 16,415
  • 20
  • 78
  • 97
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,364
  • 5
  • 24
  • 43
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…
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
  • 603
  • 4
  • 18
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,325
  • 1
  • 10
  • 26
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
  • 10,395
  • 4
  • 37
  • 39
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…
Firewall_Sudhan
  • 2,417
  • 1
  • 15
  • 11
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
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,260
  • 12
  • 20
2
votes
2 answers

How Can I debug R8 during compilation?

Is there any way to debug R8 during compilation of an Android project ? I have a really weird error and the casual fix won't help
Ismail H
  • 3,310
  • 1
  • 27
  • 48
2
votes
1 answer

Which Android studio 3.3 Build variant is recommended?

Android studio 3.3 just released yesterday has new items in the Build Variants tab and I cannot figure out which one is recommended for release. I need this info to be able to create SHA1 with the right variant for auth library yet I cannot find it…
2
votes
1 answer

Which compiler is currently used in android to compile Java to .class files after D8 dexer was introduced?

After Jack compiler was deprecated and D8 was introduced where the java -> .class files part was separated again (unlike jack where it happened in a single step), is the Oracle Java SE javac compiler being used for compilation again?
abhiank
  • 2,828
  • 4
  • 21
  • 32
2
votes
2 answers

D8: Type `sun.misc.Unsafe` was not found

After enabling D8 in my android project, I've started seeing these warnings: /Users/yashasvi/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/27.0.1-android/b7e1c37f66ef193796ccd7ea6e80c2b05426182d/guava-27.0.1-android.jar: D8: Type…
Yash
  • 4,775
  • 3
  • 26
  • 59
1
2 3