fat-aar-android icon indicating copy to clipboard operation
fat-aar-android copied to clipboard

Didn't find class strings values

Open AnD010 opened this issue 5 years ago • 1 comments

Hi,

I have a fat aar , this fat arr contains 4 modules. I made the fat aar and apparently all works fine...but when I try access in one of my modules to res/values/string ... I have the error

 Caused by: java.lang.ClassNotFoundException: Didn't find class "com.xxxxsdk.R$string" on path: DexPathList[[zip file "/data/app/com.xxxxx.examplekernel-3_u1RywX3P4_qQAsaC4dog==/base.apk"],nativeLibraryDirectories=[/data/app/com.xxxx.examplekernel-3_u1RywX3P4_qQAsaC4dog==/lib/x86, /system/lib, 

/system/product/lib]] When I decompile the aar I can see res/values and inside I have the string files...

image

This is my way to import my modules image

I did the test to add my module that contains the text resources in an aar... I have the same folder structure (you can see in image below) but the module into the aar work fine and getString() obtain the string folder correctly image I don´t undestand why when I use fat aar to generare a fat aar dont found string resources.....

my version gradle and kotlin image

In case the above did not work, I am trying to put my module as an aar library already compiled inside the lib folder, but this is not working either since the relationships do not appear. I don´t see my code in the lib folder image image

Process: com.drivesmart.examplekernel, PID: 14740 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/drivesmartsdk/R$string;>

AnD010 avatar Feb 13 '20 09:02 AnD010

Try to upgrade plugin to 1.3.1 or higher.

kezong avatar Dec 13 '20 14:12 kezong