Home Features Docs Blog Support GitHub

Various issues with Dex2Oat

Hi all!

Currently I’m having hard times updating some of my libraries. So lately I wanted to switch from rxjava2 to rxjava3, but the dex2oat compiler won’t allow me to do so :smiley: I constantly gives me such errors, that certain classes cannot be found or are not defined.

How to solve such issues with dex2oat? I tried changing proguard rules, but not with any success so far!

Please help! :open_mouth:

dex2oat F 56880 4659478 /Users/noisyfox/Documents/projects/moe/aosp/art/compiler/oat_writer.cc:649]Unexpected failure to resolve a method: void io.reactivex.rxjava3.core.Flowable$$Lambda$1.<clinit>()
dex2oat F 56880 4659478 /Users/noisyfox/Documents/projects/moe/aosp/art/compiler/oat_writer.cc:655] java.lang.NoClassDefFoundError: io.reactivex.rxjava3.core.Flowable$$Lambda$1
dex2oat F 56880 4659478 /Users/noisyfox/Documents/projects/moe/aosp/art/compiler/oat_writer.cc:655] (Throwable with empty stack trace)
NATIVE BACKTRACE:
0   dex2oat                             0x000000000ad013c9 _ZN3art7Runtime5AbortEv + 99
1   dex2oat                             0x000000000ad269f1 _ZN3art10LogMessageD2Ev + 559
2   dex2oat                             0x000000000abf0ae5 _ZN3art9OatWriter22InitImageMethodVisitor11VisitMethodEmRKNS_21ClassDataItemIteratorE + 1613
3   dex2oat                             0x000000000abec452 _ZN3art9OatWriter15VisitDexMethodsEPNS0_16DexMethodVisitorE + 268
4   dex2oat                             0x000000000abec040 _ZN3art9OatWriter19InitOatCodeDexFilesEm + 176
5   dex2oat                             0x000000000abeb0f1 _ZN3art9OatWriterC2ERKNSt3__16vectorIPKNS_7DexFileENS1_9allocatorIS5_EEEEjmiPKNS_14CompilerDriverEPNS_11ImageWriterEPNS_12TimingLoggerEPNS_7SafeMapINS1_12basic_stringIcNS1_11char_traitsIcEENS6_IcEEEESN_NS1_4lessISN_EENS_17TrackingAllocatorINS1_4pairIKSN_SN_EELNS_12AllocatorTagE7EEEEE + 545
6   dex2oat                             0x000000000aa7bb6c _ZN3art7Dex2Oat13CreateOatFileEv + 422
7   dex2oat                             0x000000000aa6e875 _ZN3artL7dex2oatEiPPc + 316
8   dex2oat                             0x000000000aa6e65b main + 27
9   libdyld.dylib                       0x00007fff68e153d5 start + 1
10  ???                                 0x0000000000000009 0x0 + 9

dex2oat F 56880 4659478 /Users/noisyfox/Documents/projects/moe/aosp/art/runtime/runtime.cc:464]Runtime aborting...
Aborting thread:
"main" prio=5 tid=1 Runnable (still starting up)
  | group="" sCount=0 dsCount=0 obj=0x0 self=0x7fe9d2000000
  | sysTid=4659478 nice=-1 cgrp=default sched=1/31 handle=0x10e345c0
  | state=? schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
  | stack=0x7ffee4997000-0x7ffee499f000 stackSize=8MB
  | held mutexes= "abort lock" "mutator lock"(shared held)
  (no managed stack frames)
Pending exception java.lang.NoClassDefFoundError: io.reactivex.rxjava3.core.Flowable$$Lambda$1
(Throwable with empty stack trace)Dumping all threads without appropriate locks held: thread list lock
All threads:
DALVIK THREADS (1):
"main" prio=5 tid=1 Runnable (still starting up)
  | group="" sCount=0 dsCount=0 obj=0x0 self=0x7fe9d2000000
  | sysTid=4659478 nice=-1 cgrp=default sched=1/31 handle=0x10e345c0
  | state=? schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
  | stack=0x7ffee4997000-0x7ffee499f000 stackSize=8MB
  | held mutexes= "abort lock" "mutator lock"(shared held)
  (no managed stack frames)

dex2oat W 56880 4659478 /Users/noisyfox/Documents/projects/moe/aosp/art/runtime/barrier.cc:96] Attempted to destroy barrier with non zero count -1




25 actionable tasks: 8 executed, 17 up-to-date
FAILURE: Build failed with an exception.

How did you change your proguard file?
Did you try something like -keep class io.reactivex.rxjava3.** {*; }

Hi there!

Yeah I’ve tried that absolutely! But even after clean-rebuilding, it did not work at all :frowning:

:confused: damn. Sorry, I got no other advice.