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
1
vote
0 answers

Strange Play Store update issue only for a few users

So I updated my app recently. It wasn't a huge update, some bug fixes, removed some ad networks and their respective Activity and Service entries from the manifest. Linked Fabric with Firebase which involved a few more changes. I'll detail those…
casolorz
  • 8,486
  • 19
  • 93
  • 200
0
votes
0 answers

Any solutions to solve NoClassDefFoundError after upgrade to agp 7+?

As I upgraded agp version from 4.1.0 to 7.4.2 (gradle version 7.5.1), a NoClassDefFoundError exception got and the app crashed. Since I upgraded agp from 4.1.0 to 7.0, dx has deprecated by default and the block dexOptions have no effect and my…
0
votes
0 answers

why android compiler generate different MethodRef for same code

i happened to encounter some wired compiled bytecode which i believe both sharing the same source code like below class SomeWebView extends WebView { SomeWebView() { this.getSettings(); } } version 1 (above code write in app a)…
Minami
  • 963
  • 6
  • 21
0
votes
1 answer

Packaging of jar, so and class files into APK

Problem (shaped like a 'V'): We having a Java function a() - in a.java (top left of V) a() calls another local function b() implemented via JNI - b.cpp (bottom of V) b() creates an instance of java class C via JNI - defined in c.java (top right of…
Habor
  • 1
0
votes
0 answers

How to keep manifest file with d8 compile tool?

I build a jar for the Android platform with Gradle. When I use the dx command, it works well building a jar with manifest, but dx can't support Java 8 syntax. So I have to change compile tool to d8, it supports Java 8 syntax but it removes the…
DysaniazzZ
  • 825
  • 15
  • 29
0
votes
1 answer

d8 dex compilation fails with desugaring

I can't get d8 dex compiler to compile my jar package: $ wget https://repo1.maven.org/maven2/org/mockito/mockito-core/3.6.0/mockito-core-3.6.0.jar $ java -jar d8_2.1.86.jar --output /tmp mockito-core-3.6.0.jar 2>&1 >/dev/null | grep…
OrenIshShalom
  • 5,974
  • 9
  • 37
  • 87
0
votes
1 answer

D8: Program type already present: com.google.protobuf.AbstractMessageLite$Builder$LimitedInputStream

I am getting the following errors in my flutter project and getting no clue how to resolve it error: D8: Program type already present: com.google.protobuf.AbstractMessageLite$Builder$LimitedInputStream FAILURE: Build failed with an exception. *…
yogender
  • 202
  • 3
  • 12
0
votes
1 answer

r8 does not create output dex file

I'm trying to use r8 without much success: $ wget https://repo1.maven.org/maven2/com/mikepenz/fastadapter/3.2.7/fastadapter-3.2.7.aar $ wget https://maven.google.com/com/android/support/recyclerview-v7/26.0.1/recyclerview-v7-26.0.1.aar $ unzip…
OrenIshShalom
  • 5,974
  • 9
  • 37
  • 87
0
votes
1 answer

How to determine which dx/d8 version was used for apk creation?

How to determine which dex compiler (dx/d8) version+flags were used in creating my apk? $ wget https://github.com/federicoiosue/Omni-Notes/releases/download/6.0.5/6.0.5.apk $ cat extract_dex_compiler.py from androguard.misc import…
OrenIshShalom
  • 5,974
  • 9
  • 37
  • 87
0
votes
1 answer

r8 shrinker Java.Lang.NoSuchMethodError Message=no non-static method in xamarin forms

I am using d8+r8+Multi-Dex to deploy my Xamarin Forms App. However, when enabling r8 I am getting some weired exception. I checked debug mode and I am getting this weired error. I have also configured proguard file to exempt some of the files, but…
ARH
  • 1,566
  • 3
  • 25
  • 56
0
votes
1 answer

How do you set command line flags for d8 in a Bazel project?

For example if I wanted to set --min-api to 26: https://r8.googlesource.com/r8/+/b9cb6ae34047f19320885d9e2c594f81364fa896/src/main/java/com/android/tools/r8/D8CommandParser.java#120 I've tried various .bazelrc combinations with Bazel's -s flag on to…
Tim Trueman
  • 1,513
  • 3
  • 17
  • 28
0
votes
0 answers

AndroidX Migration issue : blacklist / exclude for JAR file

I have a jar file in libs which uses android.support.v4 and I'm trying to migrate to AndroidX. Now, Gradle sync fails until I setandroid.enableJetifier=false . But if I set this flag to false then I get D8 error Program type already present: …
Nayanesh Gupte
  • 2,735
  • 25
  • 37
0
votes
1 answer

Desugaring of a Fragment inside a library is failing

I have a fragment VideoPlayerBaseFragment inside a library project. I am using this library inside my app using artifactory build implementation "com.mindvalley.module_videoplayer:module_videoplayer:1.9.3.6" When I am building my app it is…
Harsh
  • 599
  • 3
  • 20
0
votes
0 answers

Too many dex files

When I build big multi module project, result apk contains a lot of dex files. 35 on debug version and 15 on release. Most of files has far less methods and references then 65k. Is there any way to compact dex files? I also analysed several famous…
Maksim Turaev
  • 4,115
  • 1
  • 29
  • 42
0
votes
1 answer

R8 is still in stacktrace even though it is turned off in properties

I'm using android plugin 3.4.2, gradle 5.0. I turned off R8 in gradle.properties android.enableR8 = false But I still got a stacktrace where R8 is among packages. Does it mean that R8 somehow still works, or it just dexer in r8 package? I know how…
Maksim Turaev
  • 4,115
  • 1
  • 29
  • 42