Status Update
Comments
ch...@google.com <ch...@google.com>
ch...@google.com <ch...@google.com> #4
Dump attached for further diagnosis.
ch...@google.com <ch...@google.com> #5
Almost all of the compilation time is spent in the conditional -if rule evaluation. The rules do not seem to be using wildcards, though, so this should be possible to optimize.
ap...@google.com <ap...@google.com> #6
Branch: master
commit 9678042ac45a25ba92fc9bd077d742e22dc4f081
Author: Ian Zerny <zerny@google.com>
Date: Fri Nov 13 15:43:11 2020
Return specific types when possible as if-rule candidates.
Bug: 172999904
Change-Id: I575a37fe6dc342d332cd8ea541e851d60b7fe58e
M src/main/java/com/android/tools/r8/shaking/ProguardConfigurationRule.java
ap...@google.com <ap...@google.com> #7
Branch: 2.1
commit fc25d4645207e58d52101f817520a5d6d65b4dff
Author: Ian Zerny <zerny@google.com>
Date: Mon Nov 16 08:23:32 2020
Version 2.1.82
Bug: 172999904
Change-Id: Ie2e4ccac747c4a233b645f223fe7ca5a51730f12
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #8
Branch: 2.1
commit dfe418b7af4fd4ca143f496a405b8b04ff722663
Author: Ian Zerny <zerny@google.com>
Date: Mon Nov 16 08:22:19 2020
Return specific types when possible as if-rule candidates.
Bug: 172999904
Change-Id: I575a37fe6dc342d332cd8ea541e851d60b7fe58e
M src/main/java/com/android/tools/r8/shaking/ProguardConfigurationRule.java
ap...@google.com <ap...@google.com> #9
Branch: 2.2
commit d28600019e306627cca0ab7a5f2e7a11a2974599
Author: Ian Zerny <zerny@google.com>
Date: Mon Nov 16 08:12:02 2020
Version 2.2.42
Bug: 172999904
Change-Id: I95f6c0aad4cd68eb80c5294f6ef5fc57c5af6779
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #10
Branch: 2.2
commit 5de00eac48d064fd57c2f3f8e7872e267f99a176
Author: Ian Zerny <zerny@google.com>
Date: Mon Nov 16 08:10:25 2020
Return specific types when possible as if-rule candidates.
Bug: 172999904
Change-Id: I575a37fe6dc342d332cd8ea541e851d60b7fe58e
M src/main/java/com/android/tools/r8/shaking/ProguardConfigurationRule.java
ap...@google.com <ap...@google.com> #11
Branch: 2.1
commit dfe418b7af4fd4ca143f496a405b8b04ff722663
Author: Ian Zerny <zerny@google.com>
Date: Mon Nov 16 08:22:19 2020
Return specific types when possible as if-rule candidates.
Bug: 172999904
Change-Id: I575a37fe6dc342d332cd8ea541e851d60b7fe58e
M src/main/java/com/android/tools/r8/shaking/ProguardConfigurationRule.java
ze...@google.com <ze...@google.com> #12
Thanks for reporting this issue! A fix for it has now landed with versions 2.1.82 and 2.2.42 which are our release branches for AGP 4.1 and 4.2 respectively.
You can manually amend your build to use one of these versions by updating build.gradle ala:
buildscript {
repositories {
maven {
url 'https://storage.googleapis.com/r8-releases/raw'
}
}
dependencies {
classpath 'com.android.tools:r8:<R8_VERSION>' // Must be before the Gradle Plugin for Android.
classpath 'com.android.tools.build:gradle:<AGP_VERSION>' // Your current AGP version.
}
}
where the <R8_VERSION> and <AGP_VERSION> are suitably set.
Let us know if this resolves the issue on your end.
aj...@gmail.com <aj...@gmail.com> #13
Tested with AGP 4.1 and working great. Thanks!
yo...@gmail.com <yo...@gmail.com> #14
is there a plan to release AGP 4.1.2 with this fix?
ze...@google.com <ze...@google.com> #15
Thanks for letting us now it works! This fix is pushed to the branch so if a 4.1.2 cut is made this fix will be included.
la...@gmail.com <la...@gmail.com> #16
Hay Mister I think that would help your time today but not sure what you have received your payment of my first year I need your phone numbers were still get there and you won't know when she had in advance you won't happen before she wants is no other words
la...@gmail.com <la...@gmail.com> #17
buildscript {
repositories {
maven {
url '
wq...@gmail.com <wq...@gmail.com> #19
I got same problem with Gradle: gradle-7.0-all Android Gradle Plugin: 4.1.3 Kotlin Gradle Plugin: 1.4.30
Task :app:minifyReleaseWithR8 R8: Library class android.content.res.XmlResourceParser implements program class org.xmlpull.v1.XmlPullParser
When I use dom4j to parse XML files, the following error occurs with release APK, and then i got errors: Warning: Caught exception attempting to use SAX to load a SAX XMLReader 2021-11-12 11:17:53.785 27253-27392/? I/System.out: Warning: Exception was: org.xml.sax.SAXException: Can't create default XMLReader; is system property org.xml.sax.driver set? 2021-11-12 11:17:53.785 27253-27392/? I/System.out: Warning: I will print the stack trace then carry on using the default SAX parser 2021-11-12 11:17:53.785 27253-27392/? W/System.err: org.xml.sax.SAXException: Can't create default XMLReader; is system property org.xml.sax.driver set? 2021-11-12 11:17:53.785 27253-27392/? W/System.err: at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:159) 2021-11-12 11:17:53.785 27253-27392/? W/System.err: at org.dom4j.io.SAXHelper.createXMLReader(SourceFile:2) 2021-11-12 11:17:53.785 27253-27392/? W/System.err: at org.dom4j.io.SAXReader.createXMLReader(SourceFile:1) 2021-11-12 11:17:53.785 27253-27392/? W/System.err: at org.dom4j.io.SAXReader.getXMLReader(SourceFile:2) 2021-11-12 11:17:53.785 27253-27392/? W/System.err: at org.dom4j.io.SAXReader.read(SourceFile:40) 2021-11-12 11:17:53.785 27253-27392/? W/System.err: at org.dom4j.io.SAXReader.read(SourceFile:25) 2021-11-12 11:17:53.785 27253-27392/? W/System.err: at pt.c(SourceFile:3) 2021-11-12 11:17:53.785 27253-27392/? W/System.err: at pt.d(SourceFile:2) 2021-11-12 11:17:53.785 27253-27392/? W/System.err: at nt.j(SourceFile:2) 2021-11-12 11:17:53.785 27253-27392/? W/System.err: at yt.j(SourceFile:2) 2021-11-12 11:17:53.785 27253-27392/? W/System.err: at ov.M(SourceFile:3)
Description
In moshi 1.10.0 proguard rules are generated automatically by code gen. This creates many files one for each annotated class.
This started to cause R8 to have a significant performance issue. Sometimes resulting in this error message.
Here is a build scan of Moshi 1.9.3 on a sample projecthttps://scans.gradle.com/s/fxq27ota2pdpo/performance/execution where R8 only takes 9.565s
And here is the same project with Moshi 1.11.0https://scans.gradle.com/s/3v3kxnwz6wp7c/performance/execution where R8 takes 11m 41.181s
Additional Information:
Gradle: 6.5 Android Gradle Plugin: 4.1.1 Kotlin Gradle Plugin: 1.4.10