Status Update
Comments
ch...@google.com <ch...@google.com> #2
Thanks for the report! Would it be possible for you to share an Android Studio reproduction project, or the input class files from the build that leads to the above error? It is possible to dump the input program class files using R8 by building with ./gradlew assembleRelease --no-daemon -Dcom.android.tools.r8.dumpinputtodirectory=/path/to/dir
.
If you prefer to share it privately you can share it with
lc...@gmail.com <lc...@gmail.com> #3
I am getting somewhat of a similiar issue.
below are my logs BUT the thing is my app can be started BUT my retrofit calls are selectively hanging and waiting for a response forever essentially stuck, while other calls are running ok.
I do not know if its the same issue, downgrading to r8 1.6.89 solves the problem. I see the below logs when i start my app, i do not know if its related.
W Opening an oat file without a class loader. Are you using the deprecated DexFile APIs?
W Method Landroidx/core/app/j$d;.a is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/core/app/j$d;.b is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/core/app/j$d;.c is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/core/app/j$d;.d is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/core/app/j$d;.e is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/core/app/j$d;.f is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/core/app/j$d;.g is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/core/app/n;.c is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/core/app/n;.d is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/core/app/n;.e is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/core/app/n;.f is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/core/app/n;.g is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/core/app/n;.h is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/core/app/n;.i is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/fragment/app/h;.a is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/preference/b;.d is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/preference/b;.e is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/preference/b;.f is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Landroidx/preference/b;.g is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/android/gms/internal/clearcut/y;.t is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/android/gms/internal/firebase_auth/a;.t is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/android/gms/internal/measurement/h1;.t is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/android/material/floatingactionbutton/a;.a is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.a
pk
W Method Lcom/google/android/material/floatingactionbutton/a;.b is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.a
pk
W Method Lcom/google/android/play/core/internal/e0;.t is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/crypto/tink/shaded/protobuf/t;.a is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/crypto/tink/shaded/protobuf/t;.e is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/crypto/tink/shaded/protobuf/t;.h is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/crypto/tink/shaded/protobuf/t;.j is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/crypto/tink/shaded/protobuf/t;.k is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/crypto/tink/shaded/protobuf/t;.n is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/crypto/tink/shaded/protobuf/t;.o is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/crypto/tink/shaded/protobuf/t;.p is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/crypto/tink/shaded/protobuf/t;.r is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/crypto/tink/shaded/protobuf/t;.s is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/crypto/tink/shaded/protobuf/t;.u is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/crypto/tink/shaded/protobuf/t;.v is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/crypto/tink/shaded/protobuf/y0;.a is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/crypto/tink/shaded/protobuf/y0;.b is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lf/a/l/a/b;.b is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lf/q/b/a;.a is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lf/q/b/a;.b is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lf/q/b/a;.c is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lf/q/b/a;.d is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lf/q/b/a;.e is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lf/q/b/a;.g is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lf/q/b/a;.h is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/b/d/b/a;.F1 is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/b/d/f/s;.t is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/c/a0/d;.a is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/c/p/c;.a is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/c/p/c;.b is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/c/p/c;.c is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/c/p/c;.d is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/c/p/c;.e is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/c/p/c;.f is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/c/p/c;.g is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/c/p/c;.h is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/c/p/c;.i is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/c/p/c;.j is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/c/u/b;.a is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/c/u/b;.b is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/c/u/b;.c is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/c/u/b;.d is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lg/f/a/c/u/b;.e is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/firebase/database/t/b;.c is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/firebase/database/t/b;.d is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/firebase/database/t/b;.e is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/firebase/database/t/b;.f is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lcom/google/firebase/database/t/b;.h is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lf/q/a/b$b;.b is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lf/q/a/b$b;.c is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lf/q/a/b$b;.d is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk
W Method Lkotlin/g0/o/c/l0/c/b/h;.a is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk!classes2.dex
W Method Lkotlin/g0/o/c/l0/c/b/h;.b is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk!classes2.dex
W Method Lkotlin/g0/o/c/l0/c/b/h;.c is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk!classes2.dex
W Method Lkotlin/g0/o/c/l0/c/b/h;.d is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.apk!classes2.dex
W Method Lkotlin/reflect/jvm/internal/impl/descriptors/c1/l;.g is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/sg.ndi.sp-0nKvDXbFXEI7jLz0dKeugg==/base.ap
k!classes2.dex
ch...@google.com <ch...@google.com> #4
lceks171@ would it be possible for you to share a reproduction? The issue with abstract methods on non-abstract classes could very well be the same issue. The log from
lc...@gmail.com <lc...@gmail.com> #5
Yes that is the thing, i tried to create a sample project to reproduce the issue but i cannot seem to encounter the same issue.
my issue specifically is that i compiled my app with r8 version 1.6.89 on AGP 4.0, and i was able to get a response from my retrofit + okhttp + okio + moshi network call. Compiling the same code with r8 version 2.0.74 and above will seem to make my some of my network calls stuck at waiting for the response.
Is there a way to debug what r8 obfuscates or strips from the codebase between the 2 version of r8?
ch...@google.com <ch...@google.com> #6
Would it be possible for you to share your Proguard configuration? You can dump all the Proguard configuration rules using the -printconfiguration
rule.
In particular, I am wondering if you have an -assumenosideeffects
rule that uses a wildcard *
. If so, that could have unintended side effects such as marking the synchronization methods on java.lang.Object
as not having side effects, because the wildcard is also applied to super classes.
lc...@gmail.com <lc...@gmail.com> #7
Sure here is my config file.
ch...@google.com <ch...@google.com> #8
Thanks for sharing the config. The issue you are seeing could very well be from this part:
# https://proandroiddev.com/is-your-kotlin-code-really-obfuscated-a36abf033dde
-assumenosideeffects class kotlin.jvm.internal.Intrinsics { *; }
Could you please try changing the above rule into the following (this is also the rule that is now suggested at
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
public static void checkExpressionValueIsNotNull(java.lang.Object, java.lang.String);
public static void checkFieldIsNotNull(java.lang.Object, java.lang.String);
public static void checkFieldIsNotNull(java.lang.Object, java.lang.String, java.lang.String);
public static void checkNotNull(java.lang.Object);
public static void checkNotNull(java.lang.Object, java.lang.String);
public static void checkNotNullExpressionValue(java.lang.Object, java.lang.String);
public static void checkNotNullParameter(java.lang.Object, java.lang.String);
public static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
public static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String);
public static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String, java.lang.String);
public static void throwUninitializedPropertyAccessException(java.lang.String);
}
lc...@gmail.com <lc...@gmail.com> #9
Oh! the medium post updated. I tried the updated proguard rules and my network calls are working as expected. However i still see the logs in #3 though, can they safely be ignored?
ch...@google.com <ch...@google.com> #10
Great, thanks for the confirmation! Yes, the logs in #3 can safely be ignored. We are planning to not emit any abstract methods on non-abstract classes in an upcoming version, which should eliminate these warnings. I will post an update here once that has landed.
Keeping this issue open as the verification error in
ap...@google.com <ap...@google.com> #11
Branch: master
commit a75678dd20472e90e692b8e53d2cf06939e3c7ad
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 03 13:43:37 2020
Reproduce abstract method on non-abstract class warnings
Bug: 158018192
Change-Id: Idef706e9f2ea79b621813747eeb24e1f4892cf17
M src/test/java/com/android/tools/r8/R8TestBuilder.java
M src/test/java/com/android/tools/r8/R8TestCompileResult.java
M src/test/java/com/android/tools/r8/maindexlist/MainDexListTests.java
A src/test/java/com/android/tools/r8/shaking/AbstractMethodOnNonAbstractClassTest.java
M src/test/java/com/android/tools/r8/smali/SmaliBuildTest.java
M src/test/java/com/android/tools/r8/smali/SmaliTestBase.java
M src/test/java/com/android/tools/r8/utils/codeinspector/CodeInspector.java
ga...@gmail.com <ga...@gmail.com> #12
It is hard to provide source codes or input class files.
So, I'm trying to find which point has padding error. (source code is slightly changed, so, offset is moved )
$ dexdump -c classes3.dex
Processing 'classes3.dex'...
dexdump E 06-04 11:01:17 3412489 3412489 dexdump.cc:1884] Failure to verify dex file 'classes3.dex': Non-zero padding 3 before section of type 8195 at offset 0x602b48
$ dexdump -f -h -d -j classes3.dex
...
Class #9103 -
Class descriptor : 'Lk/a/d/c/i/d/b;'
Access flags : 0x0011 (PUBLIC FINAL)
Superclass : 'Ljava/lang/Object;'
Interfaces -
#0 : 'Lk/a/d/c/i/d/a;'
...
Direct methods -
#0 : (in Lk/a/d/c/i/d/b;)
name : '<init>'
type : '()V'
access : 0x10001 (PUBLIC CONSTRUCTOR)
code -
registers : 3
ins : 1
outs : 2
insns size : 25 16-bit code units
602b48: |[602b48] k.a.d.c.i.d.b.<init>:()V
602b58: 7010 f54c 0200 |0000: invoke-direct {v2}, Ljava/lang/Object;.<init>:()V // method@4cf5
602b5e: 2200 280e |0003: new-instance v0, Le8/s/k0; // type@0e28
602b62: 7010 044b 0000 |0005: invoke-direct {v0}, Le8/s/k0;.<init>:()V // method@4b04
And I found k.a.d.c.i.d.b
is obfuscated kotlin data class.
Should I check this class?
ap...@google.com <ap...@google.com> #13
Branch: master
commit cd3cb7f87c501da2b5b342ad65bc57cb8b01866e
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Jun 04 11:47:06 2020
Disallow abstract methods on non-abstract classes
Bug: 158018192
Change-Id: Idbf83805290a2599f757e194ada419291c104002
M src/main/java/com/android/tools/r8/graph/DexClass.java
M src/main/java/com/android/tools/r8/shaking/TreePruner.java
M src/main/java/com/android/tools/r8/utils/InternalOptions.java
M src/test/java/com/android/tools/r8/R8TestCompileResult.java
M src/test/java/com/android/tools/r8/shaking/AbstractMethodOnNonAbstractClassTest.java
M src/test/java/com/android/tools/r8/utils/codeinspector/CodeInspector.java
ch...@google.com <ch...@google.com> #14
Could you try to build with compiler assertions enabled to check if that reveals anything?
You can build with assertions enabled by running JAVA_OPTS="-ea:com.android.tools.r8..." ./gradlew assembleRelease --info --no-daemon
. When building with --info
, you should see the log "Running R8 version X.Y.Z with assertions enabled." in the output. If you don't see the log above, you can try adding org.gradle.jvmargs=-ea:com.android.tools.r8...
to gradle.properties.
Would it be possible for you to share classes3.dex (and possibly the source for k.a.d.c.i.d.b) privately with
ap...@google.com <ap...@google.com> #15
Branch: 2.1
commit d8b3b9a9860024e10dea3b6394cdf1140b22901a
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Jun 04 14:13:36 2020
Version 2.1.33
Cherry pick: Disallow abstract methods on non-abstract classes
CL:
Cherry pick: Remove abstract method to empty throwing method transformation in dex parser
CL:
Cherry pick: Reproduce abstract method on non-abstract class warnings
CL:
Bug: 158018192, 158069726
Change-Id: I2105e0fe4adaa07050d98f27ca79341432547008
M src/main/java/com/android/tools/r8/Version.java
M src/main/java/com/android/tools/r8/dex/DexParser.java
M src/main/java/com/android/tools/r8/graph/DexClass.java
M src/main/java/com/android/tools/r8/graph/DexEncodedMethod.java
M src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
M src/main/java/com/android/tools/r8/ir/optimize/enums/EnumUnboxer.java
M src/main/java/com/android/tools/r8/ir/optimize/info/OptimizationFeedbackSimple.java
M src/main/java/com/android/tools/r8/shaking/TreePruner.java
M src/main/java/com/android/tools/r8/utils/InternalOptions.java
M src/test/java/com/android/tools/r8/R8TestBuilder.java
M src/test/java/com/android/tools/r8/R8TestCompileResult.java
M src/test/java/com/android/tools/r8/maindexlist/MainDexListTests.java
A src/test/java/com/android/tools/r8/shaking/AbstractMethodOnNonAbstractClassTest.java
M src/test/java/com/android/tools/r8/smali/SmaliBuildTest.java
M src/test/java/com/android/tools/r8/smali/SmaliTestBase.java
M src/test/java/com/android/tools/r8/transformers/ClassFileTransformer.java
M src/test/java/com/android/tools/r8/utils/codeinspector/CodeInspector.java
A src/test/java/com/android/tools/r8/workaround/InputWithAbstractMethodOnNonAbstractClassTest.java
ga...@gmail.com <ga...@gmail.com> #16
I tried with -ea:com.android.tools.r8.dex...
, but I got exception that seems not to be cause of this issue.
ex 1:
ex 2:
So, I changed option to -ea:com.android.tools.r8... -da:com.android.tools.r8.shaking.ProguardConfigurationParser -da:com.android.tools.r8.ir.optimize.CodeRewriter
, and got following assertion.
Caused by: java.lang.AssertionError
at com.android.tools.r8.dex.FileWriter$MixedSectionOffsets.setOffsetFor(FileWriter.java:1291)
at com.android.tools.r8.dex.FileWriter$MixedSectionOffsets.setOffsetFor(FileWriter.java:1299)
at com.android.tools.r8.dex.FileWriter.writeCodeItem(FileWriter.java:477)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at com.android.tools.r8.dex.FileWriter.writeItems(FileWriter.java:376)
at com.android.tools.r8.dex.FileWriter.generate(FileWriter.java:184)
at com.android.tools.r8.dex.ApplicationWriter.writeDexFile(ApplicationWriter.java:600)
at com.android.tools.r8.dex.ApplicationWriter.lambda$write$1(ApplicationWriter.java:291)
Also, I'll asking to company to share classes3.dex and source code with google.
ap...@google.com <ap...@google.com> #17
Branch: master
commit 3a48fda7509ad170f8cc5cc3ba803ceeb08a4c1f
Author: Søren Gjesse <sgjesse@google.com>
Date: Thu Jun 04 15:49:51 2020
Add warnings for -assumenosideeffects
Warn when hitting methods on java.lang Object with wildcards.
Specifically call out wait, notify and notifyAll.
Don't warn for specific matches (no wildcard in method name).
Don't warn if `-dontwarn java.lang.Object` is speficied.
Bug: 152492625
Bug: 158018192
Change-Id: Id3dfe85f4101ca8e3351e67a51141f2f66ed015c
M src/main/java/com/android/tools/r8/graph/DexItemFactory.java
M src/main/java/com/android/tools/r8/shaking/RootSetBuilder.java
A src/main/java/com/android/tools/r8/utils/OriginWithPosition.java
M src/test/java/com/android/tools/r8/DiagnosticsMatcher.java
M src/test/java/com/android/tools/r8/shaking/assumenosideeffects/AssumenosideeffectsVisibleMethodsTest.java
M src/test/java/com/android/tools/r8/shaking/assumenosideeffects/B152492625.java
ap...@google.com <ap...@google.com> #18
Branch: 2.1
commit 5a245f08ef20ebd536e080416a989f6e45c30335
Author: Søren Gjesse <sgjesse@google.com>
Date: Mon Jun 08 09:23:58 2020
Version 2.1.35
Cherry-pick: Add warnings for -assumenosideeffects
CL:
Bug: 152492625
Bug: 158018192
Change-Id: I3c0a838b5384cc742a57987a4496f715711d8e1f
M src/main/java/com/android/tools/r8/Version.java
M src/main/java/com/android/tools/r8/graph/DexItemFactory.java
M src/main/java/com/android/tools/r8/shaking/RootSetBuilder.java
A src/main/java/com/android/tools/r8/utils/OriginWithPosition.java
M src/test/java/com/android/tools/r8/DiagnosticsMatcher.java
M src/test/java/com/android/tools/r8/shaking/assumenosideeffects/AssumenosideeffectsVisibleMethodsTest.java
M src/test/java/com/android/tools/r8/shaking/assumenosideeffects/B152492625.java
ap...@google.com <ap...@google.com> #19
Branch: 2.0
commit 8c3693700ed1d77926096733b36cea95a2766e65
Author: Søren Gjesse <sgjesse@google.com>
Date: Mon Jun 08 09:27:09 2020
Version 2.0.79
Cherry-pick: Add warnings for -assumenosideeffects
CL:
The test-part of the above CL has been patched as the branch does not
have the some test infrastructure for checking dianostic messages as
master.
Cherry-pick: Add a test for
CL:
Bug: 152492625
Bug: 158018192
Change-Id: I8d4b66acb3038d90af93642b546c269a708bbce0
M src/main/java/com/android/tools/r8/Version.java
M src/main/java/com/android/tools/r8/graph/DexItemFactory.java
M src/main/java/com/android/tools/r8/shaking/RootSetBuilder.java
A src/main/java/com/android/tools/r8/utils/OriginWithPosition.java
M src/test/java/com/android/tools/r8/shaking/assumenosideeffects/AssumenosideeffectsVisibleMethodsTest.java
A src/test/java/com/android/tools/r8/shaking/assumenosideeffects/B152492625.java
ap...@google.com <ap...@google.com> #20
Branch: master
commit 6700ee9747f78e1ee0dec07c8c8ae28ecac52bd0
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Jun 09 08:31:15 2020
Change some warnings for -assumenosideeffects to errors
Wildcard -assumenosideeffects rules hitting wait, nofify and nofifyAll
on java.lang.Object are now considered compilation errors.
With -dontwarn these will become warnings, so compilation can succeed.
Bug: 152492625
Bug: 158018192
Change-Id: Ib6a93a332ec241de9fa7b4d53f381a8237d0fb11
M src/main/java/com/android/tools/r8/shaking/RootSetBuilder.java
M src/test/java/com/android/tools/r8/shaking/assumenosideeffects/B152492625.java
ch...@google.com <ch...@google.com> #21
Thanks for the additional information. The assertion error in
Could you please try to build with R8 7e3089abb4995d14a425d2d34a423eb4fe23380a with assertions enabled, and share the stack trace of the assertion error (in any)? You can build with this version of R8 by making the following changes to build.gradle:
buildscript {
repositories {
maven {
url "https://storage.googleapis.com/r8-releases/raw/master"
}
}
dependencies {
classpath 'com.android.tools:r8:7e3089abb4995d14a425d2d34a423eb4fe23380a' // Must be before the Gradle Plugin for Android.
classpath 'com.android.tools.build:gradle:X.Y.Z' // Your current AGP version.
}
}
If you see a warning "Distributing classes using InheritanceClassInDexDistributor" or "Distributing classes using PackageSplitPopulator" it would also be useful to know which one.
ga...@gmail.com <ga...@gmail.com> #22
I ran gradle with -ea:com.android.tools.r8.dex...
jvm option.
And, after apply 7e3089abb4995d14a425d2d34a423eb4fe23380a
, I can see many D8: Distributing classes using PackageSplitPopulator
message whenever dex is processing.
And finally I got following assertion message.
Caused by: java.lang.AssertionError: Duplicate code object, current method: boolean com.xxxx.xxxx.xxxx(java.lang.String) (obsolete: false), existing: boolean com.xxxx.xxxx.xxxx(java.lang.String) (obsolete: false)
at com.android.tools.r8.dex.FileWriter.lambda$sortDexCodesByClassName$1(FileWriter.java:337)
at com.android.tools.r8.graph.DexClass.forEachMethod(DexClass.java:346)
at com.android.tools.r8.dex.FileWriter.sortDexCodesByClassName(FileWriter.java:320)
at com.android.tools.r8.dex.FileWriter.generate(FileWriter.java:171)
at com.android.tools.r8.dex.ApplicationWriter.writeDexFile(ApplicationWriter.java:600)
at com.android.tools.r8.dex.ApplicationWriter.lambda$write$1(ApplicationWriter.java:291)
at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
And this is from same source code location with issue
Also, I tried to run with jvm option -ea:com.android.tools.r8... -da:com.android.tools.r8.shaking.ProguardConfigurationParser -da:com.android.tools.r8.ir.optimize.CodeRewriter
, I found following assertion message.
Caused by: java.lang.AssertionError
at com.android.tools.r8.ir.optimize.staticizer.ClassStaticizerGraphLense.mapInvocationType(ClassStaticizerGraphLense.java:34)
at com.android.tools.r8.graph.GraphLense$NestedGraphLense.lookupMethod(GraphLense.java:958)
at com.android.tools.r8.graph.GraphLense$NestedGraphLense.lookupMethod(GraphLense.java:950)
at com.android.tools.r8.ir.conversion.LensCodeRewriter.rewrite(LensCodeRewriter.java:168)
at com.android.tools.r8.ir.conversion.IRConverter.optimize(IRConverter.java:1134)
at com.android.tools.r8.ir.conversion.IRConverter.rewriteCodeInternal(IRConverter.java:1101)
at com.android.tools.r8.ir.conversion.IRConverter.lambda$rewriteCode$12(IRConverter.java:1073)
at com.android.tools.r8.utils.ExceptionUtils.withOriginAttachmentHandler(ExceptionUtils.java:141)
at com.android.tools.r8.ir.conversion.IRConverter.rewriteCode(IRConverter.java:1069)
at com.android.tools.r8.ir.conversion.IRConverter.processMethod(IRConverter.java:1051)
at com.android.tools.r8.ir.conversion.IRConverter.lambda$processMethodsConcurrently$11(IRConverter.java:1026)
at com.android.tools.r8.utils.ThreadUtils.lambda$processItems$0(ThreadUtils.java:25)
at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
And I'm trying to find what are newMethod and originalMethod.
ga...@gmail.com <ga...@gmail.com> #23
newMethod
and originalMethod
are another one. And it is kotlin method of object such as
object Logger {
fun logging(log: String) {
}
}
And method does not have any reference of this(Logger), and third argument(Invoke.Type
) is Type.STATIC
ga...@gmail.com <ga...@gmail.com> #24
After added @Keep annotation on
And on device, dex file can be loaded by art runtime..
ga...@gmail.com <ga...@gmail.com> #25
I added following proguard rule instead of @Keep annotation.
-keep,allowobfuscation,allowoptimization class com.xxx.xxx.XxxxManager {
public static boolean verifySomeOfScheme(java.lang.String);
}
Only allowshrinking
modifier added, same issue is raised, again.
ga...@gmail.com <ga...@gmail.com> #26
I tried to extract program.jar
and library.jar
files from output of -Dcom.android.tools.r8.dumpinputtodirectory=
option.
If method is duplicated really, I might check method is duplicated on these jar files.
But I confirmed com.xxx.xxx.XxxxManager.verifySomeOfScheme
is not duplicated on these jar files.
ch...@google.com <ch...@google.com> #27
Thanks for sharing the results.
-
Just to be sure, is "boolean com.xxxx.xxxx.xxxx(java.lang.String)" and "boolean com.xxxx.xxxx.xxxx(java.lang.String)" the same method in the following assertion error that you shared?
Caused by: java.lang.AssertionError: Duplicate code object, current method: boolean com.xxxx.xxxx.xxxx(java.lang.String) (obsolete: false), existing: boolean com.xxxx.xxxx.xxxx(java.lang.String) (obsolete: false)
If so, would it be possible for you to check if they are identical by printing the result of
method == seenCodes.get(code)
inFileWriter#sortDexCodesByClassName()
? -
You shared that the assertion error was for the same source location as in
. So is it correct that "boolean com.xxxx.xxxx.xxxx(java.lang.String)" is the methodb/157966650 boolean hasUrlScheme(java.lang.String)
? In it seems that you referred to the method ascomment #25 boolean verifySomeOfScheme(java.lang.String)
-- did you meanboolean hasUrlScheme(java.lang.String)
or what is the relation to this method? -
Could you try to apply the patch at
https://r8-review.googlesource.com/c/r8/+/52002 and rebuild with assertion errors? This will fail if there are duplicate methods prior to writing.If this fails, it would be interesting to hear the results of running with R8 version 2.1.35. This version should fail with an assertion error at the exact point in time where a duplicate method is introduced.
-
Would it be possible for you to share a small Android Studio project that reproduces the assertion error in
ClassStaticizerGraphLense.mapInvocationType()
? It might reproduce if you just move the overall structure of yourLogger
and use it in a similar way in a new project.
Thanks for your time, we appreciate your help in getting to the bottom of this issue!
A bit of analysis for future reference:
It is somewhat interesting that the newly introduced assertion that calls verifyCodeObjectsOwners()
does not fail prior to writing (
The fact that the assertion error at mapping.getClasses()
contains the same class twice. Thus it seems that there are two methods that have the same code object at this point, or that MethodToCodeObjectMapping
maps two different methods with different code objects to the same code object. MethodToCodeObjectMapping$MapBacking
uses an IdentityHashMap<DexEncodedMethod, DexCode>
so even if there were two different methods with the same signature but different code objects we should not be mapping them to the same code object as a result of a collision (this could happen with an IdentityHashMap<DexMethod, DexCode>
).
ga...@gmail.com <ga...@gmail.com> #28
1. Yes. it is same method, and it is a method that described on
2. Sorry about confusion. These are same method, but in our company policy, method name could not unveil, so I renamed temporary.
3, 4: I'll try it.
Thank you very much for your help and detailed descriptions.
ga...@gmail.com <ga...@gmail.com> #29
Reply for
-
~ I tried to check again with Android Studio Evaluat Window (on Debugger), and
method == seenCodes.get(code)
is true (same instance). ~
I got mistake. identical by printing the result areCaused by: java.lang.AssertionError: Duplicate code object, current method: boolean com.xxxx.xxxx.xxxx(java.lang.String) (obsolete: false), existing: boolean com.xxxx.xxxx$SingletonHolder.xxxx(java.lang.String) (obsolete: false)
-
With
https://r8-review.googlesource.com/c/r8/+/52002 , assert is raised onhttps://r8.googlesource.com/r8/+/d3b6c98c6f2947a777d283234c9e3beb2dc6d785/src/main/java/com/android/tools/r8/graph/DirectMappedDexApplication.java#188
From this line, method.toSourceString()
points boolean com.xxxx.xxxx.xxxx(java.lang.String)
.
But otherMethod.toSourceString()
points boolean com.xxxx.xxxx$SingletonHolder.xxxx(java.lang.String)
that is not in source code.
Actually, com.xxxx.xxxx class implementation is
public class xxxx {
private xxxx() {}
private static class SingletonHolder {
public static final xxxx instance = new xxxx();
}
public static xxxx getInstance() {
return SingletoneHolder.instance;
}
public void doSomething() {
String value = someclass.getStringValue();
if (!xxxx(value)) return; # static method is calling
doOtherSomething();
}
public static boolean xxxx(String value) {
return value.startsWith(SOME_PATTERN);
}
}
It seems R8 generated boolean com.xxxx.xxxx$SingletonHolder.xxxx(java.lang.String)
method while optimize it.
I tried to make simple project with above class, but project did not raise assertion.
ch...@google.com <ch...@google.com> #30
Thanks for the information, this was super helpful.
Could you try to patch in
I will try to review the optimization step-by-step with the structure you pasted, so that we can hopefully come up with a reproduction of this problem.
ch...@google.com <ch...@google.com> #31
Sorry, could you also try to build with R8 version 2.1.38 and assertions enabled? With R8 2.1, the build should fail with an assertion error as soon as a duplicate method is introduced, so I am wondering if this would fail with an exception in ClassStaticizer.java or StaticizingProcessor.java.
You can build with 2.1.38 by making the following changes to build.gradle:
buildscript {
repositories {
maven {
url 'https://storage.googleapis.com/r8-releases/raw'
}
}
dependencies {
classpath 'com.android.tools:r8:2.1.38' // Must be before the Gradle Plugin for Android.
classpath 'com.android.tools.build:gradle:X.Y.Z' // Your current AGP version.
}
}
Also, a bug in the class staticizer was fixed in R8 version 2.0.82, so it would also be interesting to hear if this fixes your issue.
Thanks!
ga...@gmail.com <ga...@gmail.com> #32
Reply for
There is no assertion with -ea:com.android.tools.r8.dex...
option from
Reply for
I tried to build with R8 2.0.82 and 2.1.38, but it still raise same AssertionError with
So, I tried merge
It seems R8 still generated boolean com.xxxx.xxxx$SingletonHolder.xxxx(java.lang.String)
method and put it in IdentityHashMap
on R8 2.0.82 and 2.1.38.
ch...@google.com <ch...@google.com>
ga...@gmail.com <ga...@gmail.com> #33
It seems there is no assertion with -ea:com.android.tools.r8.dex...
option on R8 2.0.84.
ga...@gmail.com <ga...@gmail.com> #34
I'm sorry for my mistake.
I found I did not revert proguard rule that mentioned at
mk...@google.com <mk...@google.com> #35
ganadist@, I lost track a bit - do you see the assertion on R8 2.0.84 with
Additionally, is the method defined as a static member on a kotlin companion class or on a nested class (if plain java)?
ga...@gmail.com <ga...@gmail.com> #36
I misunderstood that
So I tried to test R8 2.0.84 without
Should I test with R8 2.0.84 with
Also I tested R8 2.0.82 +
but not tested R8 2.1.38 +
Do you need result of them?
And duplicated method by R8 is plain java static method
public static boolean xxxx(String value) {
return value.startsWith(SOME_PATTERN);
}
in
mk...@google.com <mk...@google.com> #37
Thank you for the last part, I was able to make a local reproduction of the issue.
ap...@google.com <ap...@google.com> #38
Branch: master
commit 05f6e5709055a90d4e0af5dc9236a47749a9a835
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Wed Jun 17 09:42:08 2020
Add reproduction of duplicate methods due to staticizer
The staticizer will try to move methods to the host of a singleton
field by simply copying and not remove the original
Bug: 158018192
Change-Id: I8a0e3385923fcd8982d6d87b67adb654698275a6
A src/test/java/com/android/tools/r8/ir/optimize/staticizer/HostWithStaticMethodTest.java
ap...@google.com <ap...@google.com> #39
Branch: master
commit 40df14880972eebfa8e8666554d7a69093099c91
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Wed Jun 17 12:50:34 2020
Disable moving not processed members to host for staticizer
The staticizer copies members without guaranteeing the original
members will be removed. This can lead to duplicate methods that
breaks either JumboStringProcessing or the offset in dex files.
Bug: 157966650
Bug: 158018192
Change-Id: I295442a81b51eae2da2adbe49b3dae8e4c5435ec
M src/main/java/com/android/tools/r8/ir/optimize/staticizer/StaticizingProcessor.java
M src/test/java/com/android/tools/r8/ir/optimize/staticizer/HostWithStaticMethodTest.java
M src/test/java/com/android/tools/r8/ir/optimize/staticizer/InstanceInsideCompanionTest.java
M src/test/java/com/android/tools/r8/ir/optimize/staticizer/InvokeStaticWithNullOutvalueTest.java
ap...@google.com <ap...@google.com> #40
Branch: 2.0
commit 19b089a1d5a73df8f00a27fda8b29b49782c621c
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Wed Jun 17 14:10:26 2020
Version 2.0.88
Cherry-pick: Add reproduction of duplicate methods due to staticizer
CL:
Cherry-pick: Disable moving not processed members to host for
staticizer
CL:
Bug: 157966650
Bug: 158018192
Change-Id: If0f96a1a9a3782eab457688e4f7ca9170bbe321d
M src/main/java/com/android/tools/r8/Version.java
M src/main/java/com/android/tools/r8/ir/optimize/staticizer/StaticizingProcessor.java
A src/test/java/com/android/tools/r8/ir/optimize/staticizer/HostWithStaticMethodTest.java
M src/test/java/com/android/tools/r8/ir/optimize/staticizer/InstanceInsideCompanionTest.java
M src/test/java/com/android/tools/r8/ir/optimize/staticizer/InvokeStaticWithNullOutvalueTest.java
ga...@gmail.com <ga...@gmail.com> #41
I can confirm R8 2.0.88 fixed this issue, and all dex file can be verified on ART or dexdump.
Thank you very much!.
mk...@google.com <mk...@google.com> #42
Thank you for the quick confirmation. Will mark this as fixed when rolled into studio/agp for an upcoming release.
ap...@google.com <ap...@google.com> #43
Branch: 2.1
commit ecaaac6f0ff91a44fda837a5fe2a1f63aca649b6
Author: Søren Gjesse <sgjesse@google.com>
Date: Wed Jun 17 16:40:41 2020
Version 2.1.42
Cherry-pick: Use compat mode for shrinking the desugared library
CL:
Cherry-pick: Collect desugared library types used in check-cast and instanceof
CL:
Cherry-pick: Collect desugared library exception types used in try/catch
CL:
Cherry-pick: Provide access to try/catch guards in code inspector
CL:
Cherry-pick: Add reproduction of duplicate methods due to staticizer
CL:
Cherry-pick: Disable moving not processed members to host for
staticizer
CL:
Bug: 158815562
Bug: 158417777
Bug: 157966650
Bug: 158018192
Change-Id: I32cdfc36dd24db48deb4b3e692bbbbb68d89a28e
M src/main/java/com/android/tools/r8/L8Command.java
M src/main/java/com/android/tools/r8/Version.java
M src/main/java/com/android/tools/r8/code/CheckCast.java
M src/main/java/com/android/tools/r8/code/InstanceOf.java
M src/main/java/com/android/tools/r8/code/Instruction.java
M src/main/java/com/android/tools/r8/dex/DexOutputBuffer.java
M src/main/java/com/android/tools/r8/dex/FileWriter.java
M src/main/java/com/android/tools/r8/ir/optimize/staticizer/StaticizingProcessor.java
M src/test/java/com/android/tools/r8/desugar/desugaredlibrary/JavaTimeTest.java
A src/test/java/com/android/tools/r8/ir/optimize/staticizer/HostWithStaticMethodTest.java
M src/test/java/com/android/tools/r8/ir/optimize/staticizer/InstanceInsideCompanionTest.java
M src/test/java/com/android/tools/r8/ir/optimize/staticizer/InvokeStaticWithNullOutvalueTest.java
M src/test/java/com/android/tools/r8/utils/codeinspector/CfTryCatchSubject.java
M src/test/java/com/android/tools/r8/utils/codeinspector/CodeInspector.java
M src/test/java/com/android/tools/r8/utils/codeinspector/DexTryCatchSubject.java
M src/test/java/com/android/tools/r8/utils/codeinspector/MethodSubject.java
M src/test/java/com/android/tools/r8/utils/codeinspector/TryCatchSubject.java
mk...@google.com <mk...@google.com>
pu...@gmail.com <pu...@gmail.com> #44
In my app compiled with stock R8 bundled with AS 4.0.1, I was getting a lot of these "Method ... is abstract, but the declaring class is neither abstract nor an interface in dex file..." warning messages in logcat, which led me to this bug report. But I had no crashes though, unlike OP. Should I worry about these or are they benign ? These warnings are still shown in all 2.0.x versions (tested 2.0.100), and interestingly are not there anymore with 2.1.42 referenced in a commit above. Is it expected ? I expected these warnings to not be shown starting with v2.0.88.
Description
Gradle: 6.4.1
Android Studio/AGP : 4.0
D8/R8 : 2.0.74
I tried to apply AGP 4.0 on app, and I found app cannot instantiate application on device because of failed to verify dex file.
Here is device error log.
This error can raise at combination of "debuggable false" and "minifyEnabled true" under buildTypes dsl.