Fixed
Status Update
Comments
xa...@google.com <xa...@google.com> #2
That seems quite bad :/ weird.
We have fairly large test projects which do not take anywhere close to it, maybe your code is triggering some bad code path.
Can you provide a sample or share your project with us? It is impossible to do something here unless we have a reproduction case. Might also possibly be related to your machine configuration.
We have fairly large test projects which do not take anywhere close to it, maybe your code is triggering some bad code path.
Can you provide a sample or share your project with us? It is impossible to do something here unless we have a reproduction case. Might also possibly be related to your machine configuration.
[Deleted User] <[Deleted User]> #3
Let me see what I can do on the reproduction as I am anyways blocked on this. I will try to extract out the DB module in a new project and see if it reproduces the issue.
[Deleted User] <[Deleted User]> #4
Attaching the sample project. When I run the project through the android studio or even command line, I see the described issue.
Try uncommenting room-compiler dependency from app's build.gradle, it does not have the issue because room compiler is not at work.
Try uncommenting room-compiler dependency from app's build.gradle, it does not have the issue because room compiler is not at work.
[Deleted User] <[Deleted User]> #5
Did you get a chance to look at it?
ja...@google.com <ja...@google.com> #6
FYI. I see that if I comment out applying google-services plugin (at the end of the app's build.gradle file), that fixes the issue too. Hence, you may need to apply a google-services plugin with a json file to reproduce the issue.
Not sure what is going on but certainly, somethings are not playing well together.
Not sure what is going on but certainly, somethings are not playing well together.
[Deleted User] <[Deleted User]> #7
Above comment is NOT TRUE, it seems I did not do a code change after commenting out apply google-services plugin. That's why the build passed.
mn...@gmail.com <mn...@gmail.com> #8
Thanks for the sample app. I haven't gotten to the bottom of the issue yet but I wanted to give you an update and it does seem indeed that Room is taking a very long time to parse and understand your queries via the ANTLR generated parser that Room uses. I'm not sure what is so special about your queries that is causing this, but I'll comment back with an update once I find out. Sadly for now I don't have a recommendation on a workaround.
za...@gmail.com <za...@gmail.com> #9
Alright, I've drill down the problem to being the various "OR <col_name> LIKE '%' : text '%'" in your queries. Specifically they cause the SQLiteParser in Room to go down a path with poor performance as described in https://github.com/antlr/antlr4/issues/1398 . A fix for this involves updating Room's ANTRL runtime library and generated parser code with the latest version. This update will likely be available in Room 2.1.0-alpha02.
ko...@gmail.com <ko...@gmail.com> #10
Thanks for the update. Is 2.1.0-alpha02 around the corner?
ga...@google.com <ga...@google.com>
ma...@gmail.com <ma...@gmail.com> #11
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 8e46b9ca1f55b040a18dd86833880b5106d103b2
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Oct 10 19:17:50 2018
Update Room's ANTLR Parser to 4.7.1
Updating to the latest ANTLR version fixes the performance issue
described inhttps://github.com/antlr/antlr4/issues/1398 which affects
Room's SQL Parser since it contains left-recursive rules. Specifically
SQLite.g4 has multiple recursions to describe an expression as defined
inhttps://www.sqlite.org/lang_expr.html , meaning if a user has certain
queries that causes the parser to use the adaptivePredict algorithm
then the build time increases significantly due to Room's query
parsing.
Also bumped Room's version to 2.1.0-alpha02
Bug: 117401230
Test: ./gradlew room:integration-tests:testapp:cC
Change-Id: I4d0799a11ccee816ab209cbf74e7dcf2b2ce1a18
M buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt
M buildSrc/src/main/kotlin/androidx/build/dependencies/Dependencies.kt
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/dao/UserDao.java
https://android-review.googlesource.com/786077
https://goto.google.com/android-sha1/8e46b9ca1f55b040a18dd86833880b5106d103b2
Branch: androidx-master-dev
commit 8e46b9ca1f55b040a18dd86833880b5106d103b2
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Oct 10 19:17:50 2018
Update Room's ANTLR Parser to 4.7.1
Updating to the latest ANTLR version fixes the performance issue
described in
Room's SQL Parser since it contains left-recursive rules. Specifically
SQLite.g4 has multiple recursions to describe an expression as defined
in
queries that causes the parser to use the adaptivePredict algorithm
then the build time increases significantly due to Room's query
parsing.
Also bumped Room's version to 2.1.0-alpha02
Bug: 117401230
Test: ./gradlew room:integration-tests:testapp:cC
Change-Id: I4d0799a11ccee816ab209cbf74e7dcf2b2ce1a18
M buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt
M buildSrc/src/main/kotlin/androidx/build/dependencies/Dependencies.kt
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/dao/UserDao.java
ga...@google.com <ga...@google.com> #12
No concrete date on 2.1.0-alpha02, I want to get a few more bugs in before making the next alpha release. So maybe by the end of the month.
ma...@gmail.com <ma...@gmail.com> #13
--
- Ankit
- Ankit
ma...@gmail.com <ma...@gmail.com> #14
Using the workaround minSdk < 19 leads to Android Studio finding my tests. So the above comment is related to this issue.
mn...@gmail.com <mn...@gmail.com> #15
pr...@gmail.com <pr...@gmail.com> #16
For anyone using Kotlin. Removing compiling options for java 8 will work. We had some problem building release apks. We commented java 8 options in build.gradle file. We are using full kotlin so we will not lose lambdas, and we were ok with it.
ga...@google.com <ga...@google.com> #17
Fix will land in plugin 3.0.0-beta2. As mentioned in #12, current workaround is to set min sdk below 19. Alternatively, you can disable support for Java 8 language features.
ag/I9d812bb5be452d4f7892c947c3815e94dbd7bc5f
ag/I9d812bb5be452d4f7892c947c3815e94dbd7bc5f
na...@google.com <na...@google.com> #18
Ivan, can you point me to the CL that caused this in the first place? We'd like to do a post-mortem and find out how this was introduced and then not caught in automated or manual testing and then made it into the release.
ga...@google.com <ga...@google.com> #19
I've started a doc, go/desugar-3.0.0-beta1-postmortem, that contains info on that. Free free to edit it, or to start a new one.
[Deleted User] <[Deleted User]> #20
I was running in to a very similar issue while using AS beta2. I was able to work around the issue by reverting to AS beta1, while still using the beta2 plugin.
My minSdk is 21 and changing to 18 did not work.
Removing java8 features wasn't an option.
Tried reinstalling beta2 before reverting with no success.
My app was crashing on launch with missing class/file exceptions when using proguard.
My minSdk is 21 and changing to 18 did not work.
Removing java8 features wasn't an option.
Tried reinstalling beta2 before reverting with no success.
My app was crashing on launch with missing class/file exceptions when using proguard.
yv...@gmail.com <yv...@gmail.com> #21
The bug is _not_ fixed in Beta 3.
I just got this error and was able to use workaround setting minSdk to 18
I do use Java 8 features
I do use try with resources
I just got this error and was able to use workaround setting minSdk to 18
I do use Java 8 features
I do use try with resources
nk...@gmail.com <nk...@gmail.com> #22
The issue is back in Beta3
ga...@google.com <ga...@google.com> #23
I can confirm that the issue is back. Master is ok, but it looks like the fix did not end up in 3.0.0-beta3 release (although it is present in 3.0.0-beta2). I am trying to figure out what happened.
ga...@google.com <ga...@google.com> #24
Workaround is to set min sdk below 19, or to disable Java 8 language support. Sorry for hitting this issue once again. We will release a new version with the fix as soon as possible.
It looks like the following happened:
1) fix for this bug was cherry-picked to the release branch, and we released 3.0.0-beta2 with the fix.
2) release branch then got reset to build number 4261210 from studio-master-dev. The fix got into studio-master-dev in build 4263002, so release branch dropped the fix from 1).
3) all future cherry-picks did not touch this part of code, and we had no cherry-pick conflicts that would point out this issue.
It looks like the following happened:
1) fix for this bug was cherry-picked to the release branch, and we released 3.0.0-beta2 with the fix.
2) release branch then got reset to build number 4261210 from studio-master-dev. The fix got into studio-master-dev in build 4263002, so release branch dropped the fix from 1).
3) all future cherry-picks did not touch this part of code, and we had no cherry-pick conflicts that would point out this issue.
na...@gmail.com <na...@gmail.com> #25
I also have this bug.
I've several codes are written in Java 8 () I can't just go and disable it.
Why we can't use Gradle plugin 3.0.0-beta2 with and android studio 3.0 beta 3?
I've several codes are written in Java 8 () I can't just go and disable it.
Why we can't use Gradle plugin 3.0.0-beta2 with and android studio 3.0 beta 3?
te...@gmail.com <te...@gmail.com> #26
As stated in #24 you can set minSdk to 18 or less.
Also, in this StackOverflow answer you have an alternative workaround:https://stackoverflow.com/a/45609518/3286819
Also, in this StackOverflow answer you have an alternative workaround:
sa...@gmail.com <sa...@gmail.com> #28
Looks like this bug is back in Android Studio Beta 3.
ka...@gmail.com <ka...@gmail.com> #29
Kamil Jaszkowiak
ar...@gmail.com <ar...@gmail.com> #31
When can we expect beta 4 to release?
st...@gmail.com <st...@gmail.com> #32
This was affecting my release builds on trying to find ThrowableExtension. After adding ThrowableExtension.java as the work around like stated here: https://stackoverflow.com/a/45609518/468360 everything worked as expected. Setting my SDK min to < 19 was simply not an option for me.
ka...@gmail.com <ka...@gmail.com> #33
Kamil Jaszkowiak
ma...@dowjones.com <ma...@dowjones.com> #34
This claims to have been fixed twice yet here I am seeing this issue in AS 3.0.1
ga...@google.com <ga...@google.com> #35
Re #34: Can you please open a new bug, with a sample project or steps, that reproduce the issue? Thanks.
[Deleted User] <[Deleted User]> #36
I am working on Android studio 3.0.1 and using classpath 'com.android.tools.build:gradle:3.0.1' and still running into same issue. Is there another thread where this issue has been fixed? Here is my error:
FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.google.devtools.build.android.desugar.runtime.ThrowableExtension
at com.example.phone.MyApplicationClass.onCreate(FpopApp.java:73)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1002)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4307)
at android.app.ActivityThread.access$1300(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1264)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4917)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
at dalvik.system.NativeStart.main(Native Method)
FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.google.devtools.build.android.desugar.runtime.ThrowableExtension
at com.example.phone.MyApplicationClass.onCreate(FpopApp.java:73)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1002)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4307)
at android.app.ActivityThread.access$1300(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1264)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4917)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
at dalvik.system.NativeStart.main(Native Method)
ga...@google.com <ga...@google.com> #37
Re #36:
There is not at the moment. Please open a new bug report, and paste the link here.
There is not at the moment. Please open a new bug report, and paste the link here.
Description
1. Create a module using Java 1.8 and lambdas, and add an instrumentation test
2. Enable coverage
3. Run the tests
RESULTS
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;
at org.jacoco.agent.rt.internal_773e439.IExceptionLogger$1.logExeption(IExceptionLogger.java:25)
at org.jacoco.agent.rt.internal_773e439.Agent.startup(Agent.java:127)
at org.jacoco.agent.rt.internal_773e439.Agent.getInstance(Agent.java:50)
at org.jacoco.agent.rt.internal_773e439.Offline.<clinit>(Offline.java:31)
at org.jacoco.agent.rt.internal_773e439.Offline.getProbes(Offline.java:51)
at com.twofortyfouram.test.runner.TestButlerRunner.$jacocoInit(TestButlerRunner.java)
at com.twofortyfouram.test.runner.TestButlerRunner.<init>(TestButlerRunner.java)
at java.lang.Class.newInstance(Native Method)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5340)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1545)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Also try building the app with proguard, which will fail due to the same missing class
Include the following information that is specific for problems related to building your projects or problems with Gradle sync:
Gradle version:
4.1
Android Plugin Version:
3.0.0-beta1
Module Compile Sdk Version:
26
Module Build Tools Version:
26.0.0
Android SDK Tools version:
26.0.2