Status Update
Comments
ra...@google.com <ra...@google.com>
je...@google.com <je...@google.com>
ko...@gmail.com <ko...@gmail.com> #2
To rule the options out:
- Are you using desugared library in your project (
- What is the minSdk of your project? If it's strictly below 24, and you change it to 24, and let us know if the issue happens.
If you want us to help you further, for example by helping you build a work-around, or fix the compiler, we need you to either provide us a reproduction project (github or zip) or a compilation dump of your application (See how to generate dumps here
Thanks for the report.
im...@google.com <im...@google.com> #3
In my project minSdk is 24.
Unfortunately I can't provide you the source code or dump as this is a confidential project, but I can provide a list of dependencies, build.gradle files and a class that works with LocalDate if that helps, or maybe smth else, but not a whole project(
im...@google.com <im...@google.com> #5
Retracing from Stack overflow gives:
Caused by: com.android.tools.r8.errors.Unreachable: Attempt to enqueue an action in a non pushable enqueuer work list.
at com.android.tools.r8.shaking.EnqueuerWorklist$NonPushableEnqueuerWorklist.attemptToEnqueue(EnqueuerWorklist.java:800)
at com.android.tools.r8.shaking.EnqueuerWorklist$NonPushableEnqueuerWorklist.enqueueMarkMethodLiveAction(EnqueuerWorklist.java:856)
at com.android.tools.r8.shaking.Enqueuer.markMethodAsLiveWithCompatRule(Enqueuer.java:4882)
at com.android.tools.r8.shaking.Enqueuer.markMethodAsTargeted(Enqueuer.java:4773)
at com.android.tools.r8.shaking.Enqueuer.lambda$markVirtualMethodAsReachable$88(Enqueuer.java:3387)
at com.android.tools.r8.graph.MethodResolutionResult$SingleProgramResolutionResult.visitMethodResolutionResults(MethodResolutionResult.java:897)
at com.android.tools.r8.graph.MethodResolutionResult.forEachMethodResolutionResult(MethodResolutionResult.java:103)
at com.android.tools.r8.shaking.Enqueuer.markVirtualMethodAsReachable(Enqueuer.java:3340)
at com.android.tools.r8.shaking.Enqueuer.traceInvokeInterface(Enqueuer.java:1463)
at com.android.tools.r8.shaking.Enqueuer.traceInvokeInterface(Enqueuer.java:1447)
at com.android.tools.r8.shaking.DefaultEnqueuerUseRegistry.registerInvokeInterface(DefaultEnqueuerUseRegistry.java:86)
at com.android.tools.r8.cf.code.CfInvoke.internalRegisterUse(CfInvoke.java:153)
at com.android.tools.r8.cf.code.CfInstruction.registerUse(CfInstruction.java:104)
at com.android.tools.r8.graph.CfCode.registerCodeReferences(CfCode.java:683)
at com.android.tools.r8.graph.ProgramMethod.registerCodeReferences(ProgramMethod.java:127)
at com.android.tools.r8.shaking.Enqueuer.traceCode(Enqueuer.java:4809)
at com.android.tools.r8.shaking.Enqueuer.traceNonDesugaredCode(Enqueuer.java:4803)
at com.android.tools.r8.shaking.Enqueuer.markMethodAsLive(Enqueuer.java:4742)
at com.android.tools.r8.shaking.EnqueuerWorklist$MarkMethodLiveAction.run(EnqueuerWorklist.java:166)
at com.android.tools.r8.shaking.Enqueuer.postProcessingDesugaring(Enqueuer.java:4540)
at com.android.tools.r8.shaking.Enqueuer.trace(Enqueuer.java:4477)
at com.android.tools.r8.shaking.Enqueuer.traceApplication(Enqueuer.java:3622)
at com.android.tools.r8.R8.runEnqueuer(R8.java:1012)
at com.android.tools.r8.R8.run(R8.java:369)
at com.android.tools.r8.R8.run(R8.java:252)
at com.android.tools.r8.R8.lambda$runForTesting$1(R8.java:243)
at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:80)
... 34 more
ko...@gmail.com <ko...@gmail.com> #6
This comes from the desugaring post processing. It could be:
- desugared library retargeting
interface method desugaring(not in 1.2 with 24)- api callback
record(not generating methods)disable desugarer(not generating method)
What's going on is that R8 is verifying that code generated in the post processor is targeting already traced code.
Is there in the app any override of the following 3 methods: [java.time.ZoneId java.util.TimeZone.toZoneId(), java.time.ZonedDateTime java.util.GregorianCalendar.toZonedDateTime(), java.time.Instant java.util.Date.toInstant()] ?
Alternatively, it could be that something not traced as a library override is now traced with the callback? @mkroghj wasn't there a change on library override computation and tracing?
im...@google.com <im...@google.com>
am...@google.com <am...@google.com>
am...@google.com <am...@google.com> #7
Here is how I use the method java.time.Instant java.util.Date.toInstant():
Date.from(value.atStartOfDay(ZoneId.systemDefault()).toInstant())
and in another place
value?.let { Date.from(it.atStartOfDay(ZoneId.systemDefault())?.toInstant()) } ?: Date()
both variable 'value' is the LocalDate
ko...@gmail.com <ko...@gmail.com> #8
am...@google.com <am...@google.com> #9
Well I cannot reproduce the issue.
After deep thinking I'm trying to improve the error message in
Not sure if there is much more I can do unless someone reports a similar issue but can provide a dump.
Description
We've used AGP 4.2.2 in project and all android tests under library modules worked fine. After upgrading AGP to version 7.0.0 (and later 7.0.1) we are not able to compile android tests.
For sample project call: ./gradlew :customView:assembleDebugAndroidTest
Result: > Cannot find resource: id view_1
Expected: Successful compilation
Changing AGP version in sample project to 4.2.2 solves issue.
Missing resource id is used in kotlin code as reference for Espresso.
Build: AI-203.7717.56.2031.7583922, 202107261959,
AI-203.7717.56.2031.7583922, JRE 11.0.10+0-b96-7281165x64 JetBrains s.r.o., OS Mac OS X(x86_64) v10.15.7, screens 2880.0x1800.0, 1920.0x1080.0
AS: Arctic Fox | 2020.3.1; Kotlin plugin: 203-1.5.21-release-328-AS7717.8; Android Gradle Plugin: 4.2.2; Gradle: 7.0.2; Gradle JDK: version 11.0.10; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
IMPORTANT: Please read