Android Question Appocompat vs DesignSupport

T201016

Active Member
Licensed User
Longtime User
Hello,

Testing the "Snackbar" project, which compiled returned the following error:
B4A version: 12.80
Code parsing. (0.00s)
Java version: 8
Building Folders Structure. (0.16s)
Code compilation. (0.01s)

Obfuscatormap.txt file created in the Objects folder.
Compilation of the system code. (0.01s)
Organizing libraries. (0.02s)
(Androidx SDK)
Compiles resources (1.58s)
I combine resources (2.04s)
Composing the generated Java code. (4.22s)
Finding biblots requiring indexation (0.00s)
Dex Code (2.84s)
Dex Merge Error
Error: Cannot Fit Requested Classes in a Single Dex File (# Fields: 217392> 65536). Try Supplying a Main-Dex List
Compulation Failed
Exception in Thread "Main" java.lang.runtimexception: com.android.tools.r8.Compilationfailedexception: Compilation Failed to Complete, Position: Null: null
at com.android.tools.r8.internal.vj.a (R8_3.3.3.20-DEV+AOSP1_DD4C01853FD917497AEF2D09ABFF533F0D25B062517EA74449D40E178A34753: 98)
at com.android.tools.r8.d8.main (R8_3.3.20-3
Caused by: com.android.tools.r8.compilationfailedexception: compilation failed to complete, null: null
at version.fakestackentry (version_3.3.20-dev+aosp1.java: 0)
at com.android.tools.r8.internal.vj.a (R8_3.3.3.20-DEV+AOSP1_DD4C01853FD917497AEF2D09ABFF533F0D25B062517EA744449D40E178A34753: 75)
at com.android.tools.r8.internal.vj.a (R8_3.3.3.20-DEV+AOSP1_DD4C01853FD917497AEF2D09ABFF533F0D25B062517EA744449D40E178A34753: 28)
at com.android.tools.r8.internal.vj.a (R8_3.3.3.20-DEV+AOSP1_DD4C01853FD917497AEF2D09ABFF533F0D25B062517EA74449D40E178A34753: 27)
at com.android.tools.r8.internal.vj.b (R8_3.3.3.20-DEV+AOSP1_DD4C01853FD917497AEF2D09ABFF533F0D25B062517EA744449D40E178A34753: 2)
at com.android.tools.r8.d8.a (R8_3.3.20-DEV+AOSP1_DD4C01853FD917497AEF2D09ABFF533F0D25B062517EA74449D40E1778A34753: 22)
at com.android.tools.r8.d8.a (R8_3.3.20-DEV+AOSP1_DD4C01853FD917497AEF2D09ABFF533F0D25B062517EA74449D40E1778A34753: 17)
at com.android.tools.r8.internal.vj.a (R8_3.3.3.20-DEV+AOSP1_DD4C01853FD917497AEF2D09ABFF533F0D25B062517EA744449D40E178A34753: 85)
... 1 More
Caused by: com.android.tools.r8.internal.f: Cannot Fit Requested Classes in a Single Dex File (# Fields: 217392> 65536)
at com.android.tools.r8.internal.ys.a (R8_3.3.3.20-DEV+AOSP1_DD4C01853FD917497AEF2D09ABFF5333F0D25B062517EA744449D40E178A34753: 14)
at com.android.tools.r8.internal.ys.a (R8_3.3.3.20-DEV+AOSP1_DD4C01853FD917497AEF2D09ABFF5333F0D25B062517EA744449D40E178A34753: 22)
at com.android.tools.r8.internal.v20.a (R8_3.3.3.20-DEV+AOSP1_DD4C01853FD917497AEF2D09ABFF533F0D25B062517EA74449D40E178A34753: 565)
at com.android.tools.r8.internal.r20.a (R8_3.3.3.20-DEV+AOSP1_DD4C01853FD917497AEF2D09ABFF533F0D25B062517EA744449D40E178A34753: 7)
at com.android.tools.r8.internal.d2.a (R8_3.3.3.20-DEV+AOSP1_DD4C01853FD917497AEF2D09ABFF533F0D25B062517EA74449D40E178A34753: 335)
at com.android.tools.r8.internal.d2.a (R8_3.3.3.20-DEV+AOSP1_DD4C01853FD917497AEF2D09ABFF533F0D25B062517EA74449D40E178A34753: 412)
at com.android.tools.r8.d8.d (R8_3.3.20-DEV+AOSP1_DD4C01853FD917497AEF2D09ABFF533F0D25B062517EA74449D40E1778A34753: 794)
at com.android.tools.r8.d8.c (R8_3.3.20-3
at com.android.tools.r8.internal.vj.a (R8_3.3.3.20-DEV+AOSP1_DD4C01853FD917497AEF2D09ABFF533F0D25B062517EA74449D40E178A34753: 24)
... 5 more

Note that this project uses two libraries:
1.Appocompat V4.02
2.DesignSupport V2.32

To check the "appcompat" version - I used another example (biometric) that I successfully compiled.
I suppose that in combination with the "DesignSupport" library, together they generate the above compilation error.
Any suggestions?
 

Attachments

  • Examples.zip
    8.5 KB · Views: 75
  • DesignSupport v2.32.zip
    110.6 KB · Views: 64

BlueVision

Active Member
Licensed User
Longtime User
It's probably not a real bug, looks like a limitation of the whole concept. But I am not really sure. I had once a similiar problem. Problem was my designerscript, it became too large in size for compiling.

Error: Cannot Fit Requested Classes in a Single Dex File (# Fields: 217392> 65536). Try Supplying a Main-Dex List
 
Upvote 0

Xfood

Expert
Licensed User
add this line
#MultiDex:true
1722092793438.png
 
Upvote 0
Top