Fixed
Status Update
Comments
em...@gmail.com <em...@gmail.com> #2
This version which i am testing is the latest one : 2.0.8-dev
ri...@google.com <ri...@google.com> #3
If you have the class in base, you don't need it in your feature!
also, can you be more specific, is the class exactly the same? Is is just named the same? (if so, use a different namespace)
also, can you be more specific, is the class exactly the same? Is is just named the same? (if so, use a different namespace)
em...@gmail.com <em...@gmail.com> #4
Yes, but in my base module the library which i use is configured via "api" not "implementation" because i use it in other feature module
It was working ok before e.g in R8 version 2.0.2-dev
Please look at the stacktrace attached below.
It was working ok before e.g in R8 version 2.0.2-dev
Please look at the stacktrace attached below.
ri...@google.com <ri...@google.com> #5
To make it easier to figure our, can you bisect (i.e., exactly what version of R8 did this start failing in (i.e., which of 2.0.3-dev, 2.0.4-dev, 2.0.5-dev,2.0.6-dev 2.0.7-dev)
Also, just to be sure, you don't have the dependency in your feature as well?
Also, just to be sure, you don't have the dependency in your feature as well?
em...@gmail.com <em...@gmail.com> #6
Yes, i am sure that i don't have the dependency in my other feature modules, but they have an dependency of base module :
E.g :
Base module : api ':testLibrary:1.0.0'
Feature module : implementation project(':app') --- where "app" is the base module
About in which version it is start failing, just please wait some time to download and test them all while it will fail and will report back here.
E.g :
Base module : api ':testLibrary:1.0.0'
Feature module : implementation project(':app') --- where "app" is the base module
About in which version it is start failing, just please wait some time to download and test them all while it will fail and will report back here.
ri...@google.com <ri...@google.com>
em...@gmail.com <em...@gmail.com> #7
Hmmmm....
I tried 2.0.4-dev, 2.0.3-dev and they fail. For being sure i test again 2.0.2-dev (which i said was working OK) but it fails again.
They only change that i have made since it not failing was upgrading AS from 4.0 Canary 4 to 4.0 Canary 5...
Maybe the new AGP (4.0.0-alpha05) is not instructing the R8 correctly or something wrong while merging/packing classes with complicated dependency ?
But it is still crash of R8 as you can see from the stacktrace in the comment #4
I tried 2.0.4-dev, 2.0.3-dev and they fail. For being sure i test again 2.0.2-dev (which i said was working OK) but it fails again.
They only change that i have made since it not failing was upgrading AS from 4.0 Canary 4 to 4.0 Canary 5...
Maybe the new AGP (4.0.0-alpha05) is not instructing the R8 correctly or something wrong while merging/packing classes with complicated dependency ?
But it is still crash of R8 as you can see from the stacktrace in the
ri...@google.com <ri...@google.com> #8
Over to Scott to answer that, cc Ivan
em...@gmail.com <em...@gmail.com> #9
Can you please take a look at this other bug which i have reported in same time today just to know that it may be related to this one ?
https://issuetracker.google.com/issues/145684729
em...@gmail.com <em...@gmail.com> #10
Just to add some more detailed info, the lib which is causing the R8 issue is added as .aar file in speilcific lib folder, and added via "api" in build.gradle of base module.
sp...@google.com <sp...@google.com> #11
Thanks, I'm able to reproduce the issue, looking into it...
em...@gmail.com <em...@gmail.com> #12
Ok, that's great. Please let me know when you will fix it and send here the custom version after commit, to use it immediately.
Thank you
Thank you
sp...@google.com <sp...@google.com> #13
There is an issue here even when not doing code shrinking.
The classes *and* resources from the local AAR dependency are being packaged in the dynamic feature APK *and* the base APK, and it's happening even if the local AAR dependency uses "implementation" instead of "api".
I've attached a repro project, which is just a project with the following structure:
dynamicfeature -> app -> lib1.aar
Running assembleDebug or assembleRelease and then examining the dynamicfeature and app APKs shows that lib1.aar's classes and resources are being packaged in both APKs, which isn't the case for 4.0.0-alpha04.
I haven't figured out why this is happening yet, but it seems the local AARs artifacts are being included in the dynamic feature's runtime dependencies, even though they shouldn't be.
The classes *and* resources from the local AAR dependency are being packaged in the dynamic feature APK *and* the base APK, and it's happening even if the local AAR dependency uses "implementation" instead of "api".
I've attached a repro project, which is just a project with the following structure:
dynamicfeature -> app -> lib1.aar
Running assembleDebug or assembleRelease and then examining the dynamicfeature and app APKs shows that lib1.aar's classes and resources are being packaged in both APKs, which isn't the case for 4.0.0-alpha04.
I haven't figured out why this is happening yet, but it seems the local AARs artifacts are being included in the dynamic feature's runtime dependencies, even though they shouldn't be.
ri...@google.com <ri...@google.com> #14
Awesome, thanks Scott
re #12: just for clarity, this is not in R8, this is in the android gradle plugin. I am not sure that there is an easy way of getting a custom new version (as easy as R8 that is)
re #12: just for clarity, this is not in R8, this is in the android gradle plugin. I am not sure that there is an easy way of getting a custom new version (as easy as R8 that is)
em...@gmail.com <em...@gmail.com> #15
I understand. So will wait for next release. Unfortunately i will not be able to generate release app till next canary(maybe 2 weeks) ?
ri...@google.com <ri...@google.com> #16
Just downgrade to an older version?
https://developer.android.com/studio/archive
Alternatively, just downgrade the android gradle plugin by explicitly setting it to the previous version
classpath 'com.android.tools.build:gradle:4.0.0-alpha04
instead of
classpath 'com.android.tools.build:gradle:4.0.0-alpha05
Alternatively, just downgrade the android gradle plugin by explicitly setting it to the previous version
classpath 'com.android.tools.build:gradle:4.0.0-alpha04
instead of
classpath 'com.android.tools.build:gradle:4.0.0-alpha05
em...@gmail.com <em...@gmail.com> #17
ri...@google.com <ri...@google.com> #18
#17: Thanks for validating, keeping this open for Scott's investigation
sp...@google.com <sp...@google.com> #19
This has been fixed. The fix will be included in 4.0.0-alpha07.
Change-Id: I1435497a7bb6d34373f17bd38d8ab6b5ce89a07e
Change-Id: I1435497a7bb6d34373f17bd38d8ab6b5ce89a07e
em...@gmail.com <em...@gmail.com> #20
Thank you for information. Will wait for it.
Best Regards
Best Regards
em...@gmail.com <em...@gmail.com> #21
It is fixed on Canary 7 ! :) Thanks guys
ey...@gmail.com <ey...@gmail.com> #22
Was this backported to 3.6? I'm on RC3 and basically having the same issue.
Edit: it works on 4.0.0-alpha09
sp...@google.com <sp...@google.com> #23
No, it wasn't back ported. Only fixed in the 4.0 branch, starting at 4.0.0-alpha07.
Description