Fixed
Status Update
Comments
je...@google.com <je...@google.com>
ga...@google.com <ga...@google.com> #2
Can you please share the project that reproduces the issue?
ex...@gmail.com <ex...@gmail.com> #3
I'm afraid not due to copyright etc and it's very large. It would be easier if you can send me an Android Studio build which outputs more information
ga...@google.com <ga...@google.com> #4
Soren, can we send R8 version with additional logging?
js...@google.com <js...@google.com> #5
We have a similar issue ( issue 131140696 ). I'll post a local r8.jar here too to get more loggings.
js...@google.com <js...@google.com> #6
Could you run the attached r8.jar by editing your top-level gradle file like this?
buildscript {
dependencies {
classpath files($PATH_TO_R8_JAR) // Must be before the Gradle Plugin for Android.
classpath 'com.android.tools.build:gradle:3.4.0'
}
}
$ ./gradlew clean assembleRelease
Even though we have a similar issue on ToT ( issue 131207184 ), I prepared the logging on top of R8 1.4.77, just in case. See the attached diff.
If the logs are too verbose and you don't want to share that publicly, you can send it to jsjeon@google.com Thanks!
buildscript {
dependencies {
classpath files($PATH_TO_R8_JAR) // Must be before the Gradle Plugin for Android.
classpath 'com.android.tools.build:gradle:3.4.0'
}
}
$ ./gradlew clean assembleRelease
Even though we have a similar issue on ToT (
If the logs are too verbose and you don't want to share that publicly, you can send it to jsjeon@google.com Thanks!
js...@google.com <js...@google.com> #7
Someone else ran the logging, which helped me figure out a certain points I missed (https://issuetracker.google.com/issues/131140696#comment11 ). If you didn't try yet, please ignore attachments in comment #4 , but use attached r8.jar in this comment.
js...@google.com <js...@google.com> #8
Could you let know what libraries (and version) you're using? In particular, I wonder you may use com.google.firebase:* and com.google.android.gms:play-services-*
ex...@gmail.com <ex...@gmail.com> #9
Will let you know tomorrow. Apologies, I have been busy.
js...@google.com <js...@google.com> #10
No problem! We got responses from another reporter, and I just want to make sure this could be a dup of that issue.
ex...@gmail.com <ex...@gmail.com> #11
Ok, so with the latest r8.jar, I get:
Current version is: 1.5.21-dev (build b74371231cb896b02f83285efb055b7c00ff64d8 from go/r8bot (luci-r8-ci-archive-0-eqqf)).
AGPBI: {"kind":"error","text":"Attribute Signature requires InnerClasses attribute. Check -keepattributes directive.","sources":[{}],"tool":"D8"}
Current version is: 1.5.21-dev (build b74371231cb896b02f83285efb055b7c00ff64d8 from go/r8bot (luci-r8-ci-archive-0-eqqf)).
AGPBI: {"kind":"error","text":"Attribute Signature requires InnerClasses attribute. Check -keepattributes directive.","sources":[{}],"tool":"D8"}
js...@google.com <js...@google.com> #12
Hm, apparently, R8 1.5 is more aggressive on attributes. Could you add `-keepattributes InnerClasses` to your proguards.pro file and try again? Thanks!
ex...@gmail.com <ex...@gmail.com> #13
Current version is: 1.5.21-dev (build b74371231cb896b02f83285efb055b7c00ff64d8 from go/r8bot (luci-r8-ci-archive-0-eqqf)).
> Task :AEMobileFull:transformClassesAndResourcesWithR8ForRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':AEMobileFull:transformClassesAndResourcesWithR8ForRelease'.
> java.lang.IllegalArgumentException: Multiple entries with same key: Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String=Encoded method Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String and Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String=Encoded method Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String
> Task :AEMobileFull:transformClassesAndResourcesWithR8ForRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':AEMobileFull:transformClassesAndResourcesWithR8ForRelease'.
> java.lang.IllegalArgumentException: Multiple entries with same key: Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String=Encoded method Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String and Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String=Encoded method Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String
ex...@gmail.com <ex...@gmail.com> #14
FYI:
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-messaging:17.4.0'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation('com.google.api-client:google-api-client-android:1.23.0') {
exclude group: 'org.apache.httpcomponents'
}
implementation('com.google.apis:google-api-services-drive:v3-rev90-1.23.0') {
exclude group: 'org.apache.httpcomponents'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-messaging:17.4.0'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation('com.google.api-client:google-api-client-android:1.23.0') {
exclude group: 'org.apache.httpcomponents'
}
implementation('com.google.apis:google-api-services-drive:v3-rev90-1.23.0') {
exclude group: 'org.apache.httpcomponents'
js...@google.com <js...@google.com> #15
Thank you for several trials! Alas, we're facing a different issue now. :(
Could you try:
$ ./gradlew assembleRelease --stacktrace
which will disclose the full stack trace?
Could you try:
$ ./gradlew assembleRelease --stacktrace
which will disclose the full stack trace?
ex...@gmail.com <ex...@gmail.com> #16
I'm on Windows, this does not work:
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon athttps://docs.gradle.org/5.1.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 3166208KB object heap
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.GradleException: Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon athttps://docs.gradle.org/5.1.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 3166208KB object heap
at org.gradle.launcher.daemon.client.DaemonGreeter.parseDaemonOutput(DaemonGreeter.java:35)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:178)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:140)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.doStartDaemon(DefaultDaemonConnector.java:212)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startDaemon(DefaultDaemonConnector.java:206)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connect(DefaultDaemonConnector.java:130)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:139)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:94)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:55)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:207)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:403)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:376)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:37)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:23)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:369)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:299)
at org.gradle.launcher.Main.doAction(Main.java:36)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
* Get more help athttps://help.gradle.org
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 3166208KB object heap
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.GradleException: Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 3166208KB object heap
at org.gradle.launcher.daemon.client.DaemonGreeter.parseDaemonOutput(DaemonGreeter.java:35)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:178)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:140)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.doStartDaemon(DefaultDaemonConnector.java:212)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startDaemon(DefaultDaemonConnector.java:206)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connect(DefaultDaemonConnector.java:130)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:139)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:94)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:55)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:207)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:403)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:376)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:37)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:23)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:369)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:299)
at org.gradle.launcher.Main.doAction(Main.java:36)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
* Get more help at
js...@google.com <js...@google.com> #17
Thank you for giving it another shot. Based on your dependency,
com.google.firebase:firebase-core:16.0.8
> com.google.firebase:firebase-analytics:16.4.0
> com.google.android.gms:play-service-measurement:16.4.0
I'm sure this is a dup of issue 131140696 (See my comment https://issuetracker.google.com/issues/131140696#comment13 )
com.google.firebase:firebase-core:16.0.8
> com.google.firebase:firebase-analytics:16.4.0
> com.google.android.gms:play-service-measurement:16.4.0
I'm sure this is a dup of
ex...@gmail.com <ex...@gmail.com> #18
The r8.jar there seems to be the same?
Current version is: 1.5.21-dev (build b74371231cb896b02f83285efb055b7c00ff64d8 from go/r8bot (luci-r8-ci-archive-0-eqqf)).
> Task :AEMobileFull:transformClassesAndResourcesWithR8ForRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':AEMobileFull:transformClassesAndResourcesWithR8ForRelease'.
> java.lang.IllegalArgumentException: Multiple entries with same key: Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String=Encoded method Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String and Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String=Encoded method Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String
"build b74371231cb896b02f83285efb055b7c00ff64d8" is what I had earlier.
I'd also like to know if when this is fixed, I still had to add '-keepattributes InnerClasses'. Doesn't that mean that more code is visible with R8 compared to Proguard?
Current version is: 1.5.21-dev (build b74371231cb896b02f83285efb055b7c00ff64d8 from go/r8bot (luci-r8-ci-archive-0-eqqf)).
> Task :AEMobileFull:transformClassesAndResourcesWithR8ForRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':AEMobileFull:transformClassesAndResourcesWithR8ForRelease'.
> java.lang.IllegalArgumentException: Multiple entries with same key: Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String=Encoded method Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String and Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String=Encoded method Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String
"build b74371231cb896b02f83285efb055b7c00ff64d8" is what I had earlier.
I'd also like to know if when this is fixed, I still had to add '-keepattributes InnerClasses'. Doesn't that mean that more code is visible with R8 compared to Proguard?
js...@google.com <js...@google.com>
ap...@google.com <ap...@google.com> #19
Project: r8
Branch: master
commit 522bd9fc1d398753fed5134b6c4fe32cdae482be
Author: Jinseong Jeon <jsjeon@google.com>
Date: Sun Apr 28 14:28:53 2019
Account for IINC instruction when collecting arg uses in jar code.
Bug: 131140696, 131207184, 131443760, 130789358
Change-Id: I8fba2eb7dc2b814b2f21f2ba4fc634bf7bb58dd1
M src/main/java/com/android/tools/r8/jar/JarArgumentUseVisitor.java
M src/test/java/com/android/tools/r8/ir/optimize/unusedarguments/UnusedArgumentsIntTest.java
M src/test/java/com/android/tools/r8/ir/optimize/unusedarguments/UnusedArgumentsTestBase.java
https://r8-review.googlesource.com/37740
Branch: master
commit 522bd9fc1d398753fed5134b6c4fe32cdae482be
Author: Jinseong Jeon <jsjeon@google.com>
Date: Sun Apr 28 14:28:53 2019
Account for IINC instruction when collecting arg uses in jar code.
Bug: 131140696, 131207184, 131443760, 130789358
Change-Id: I8fba2eb7dc2b814b2f21f2ba4fc634bf7bb58dd1
M src/main/java/com/android/tools/r8/jar/JarArgumentUseVisitor.java
M src/test/java/com/android/tools/r8/ir/optimize/unusedarguments/UnusedArgumentsIntTest.java
M src/test/java/com/android/tools/r8/ir/optimize/unusedarguments/UnusedArgumentsTestBase.java
js...@google.com <js...@google.com> #20
The original issue ( comment #1 ) should be fixed by comment #19 , which may be available at AS 3.5 beta2.
Since comment #13 , though, we're seeing a different issue. I guess either duplicate methods came from different dependencies or one of R8 optimization changed or renamed another one that resulted in duplicate keys.
Regarding InnerClasses attribute, maybe I'm wrong, but I guess it came from R8's compatibility mode. With full mode, I don't think you need to specify that. Looped in some other engineers in R8 team.
Since
Regarding InnerClasses attribute, maybe I'm wrong, but I guess it came from R8's compatibility mode. With full mode, I don't think you need to specify that. Looped in some other engineers in R8 team.
ap...@google.com <ap...@google.com> #21
Project: r8
Branch: d8-1.4
commit 7c81a6c1d74eece58960b8fdee852d409af5b8b9
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Mon Apr 29 09:08:31 2019
Version 1.4.93
Cherry pick: Account for IINC instruction when collecting arg uses in jar code.
CL:https://r8-review.googlesource.com/c/r8/+/37740
Bug: 131140696, 131207184, 131443760, 130789358
Change-Id: Ic36eacad6f11d821b3207c42b9fecfc40375c2d2
M src/main/java/com/android/tools/r8/Version.java
M src/main/java/com/android/tools/r8/jar/JarArgumentUseVisitor.java
M src/test/java/com/android/tools/r8/ir/optimize/unusedarguments/UnusedArgumentsIntTest.java
M src/test/java/com/android/tools/r8/ir/optimize/unusedarguments/UnusedArgumentsTestBase.java
https://r8-review.googlesource.com/37725
Branch: d8-1.4
commit 7c81a6c1d74eece58960b8fdee852d409af5b8b9
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Mon Apr 29 09:08:31 2019
Version 1.4.93
Cherry pick: Account for IINC instruction when collecting arg uses in jar code.
CL:
Bug: 131140696, 131207184, 131443760, 130789358
Change-Id: Ic36eacad6f11d821b3207c42b9fecfc40375c2d2
M src/main/java/com/android/tools/r8/Version.java
M src/main/java/com/android/tools/r8/jar/JarArgumentUseVisitor.java
M src/test/java/com/android/tools/r8/ir/optimize/unusedarguments/UnusedArgumentsIntTest.java
M src/test/java/com/android/tools/r8/ir/optimize/unusedarguments/UnusedArgumentsTestBase.java
mk...@google.com <mk...@google.com> #22
Is the current version version failing. Please try adding the following to your build.gradle to try out version 1.5.22-dev:
buildscript {
repositories {
maven {
url "http://storage.googleapis.com/r8-releases/raw/master "
}
}
dependencies {
classpath 'com.android.tools:r8:86133db9ec0b631f12bf6a8eebc0f81c8aef5d1e' // Must be before the Gradle Plugin for Android.
classpath 'com.android.tools.build:gradle:X.Y.Z' // Your current AGP version.
}
}
If you still see an error with duplicate keys, please try and run with assertions enabled:
$ JAVA_OPTS="-ea" ./gradlew clean assembleRelease --no-daemon --stacktrace
Then post the stack-trace here or send it privately to mkroghj@google.com.
buildscript {
repositories {
maven {
url "
}
}
dependencies {
classpath 'com.android.tools:r8:86133db9ec0b631f12bf6a8eebc0f81c8aef5d1e' // Must be before the Gradle Plugin for Android.
classpath 'com.android.tools.build:gradle:X.Y.Z' // Your current AGP version.
}
}
If you still see an error with duplicate keys, please try and run with assertions enabled:
$ JAVA_OPTS="-ea" ./gradlew clean assembleRelease --no-daemon --stacktrace
Then post the stack-trace here or send it privately to mkroghj@google.com.
ex...@gmail.com <ex...@gmail.com> #23
Same error. Please note that I'm on Windows 10. The $ JAVA_OPTS="-ea" ./gradlew clean assembleRelease --no-daemon --stacktrace just gives errors when pasting it in the Terminal in several ways:
F:\Development\AS\AEM>$ JAVA_OPTS="-ea" ./gradlew clean assembleRelease --no-daemon --stacktrace
'$' is not recognized as an internal or external command,
operable program or batch file.
F:\Development\AS\AEM>$JAVA_OPTS="-ea" ./gradlew clean assembleRelease --no-daemon --stacktrace
'$JAVA_OPTS' is not recognized as an internal or external command,
operable program or batch file.
F:\Development\AS\AEM>JAVA_OPTS="-ea" ./gradlew clean assembleRelease --no-daemon --stacktrace
'JAVA_OPTS' is not recognized as an internal or external command,
operable program or batch file.
F:\Development\AS\AEM>$ JAVA_OPTS="-ea" ./gradlew clean assembleRelease --no-daemon --stacktrace
'$' is not recognized as an internal or external command,
operable program or batch file.
F:\Development\AS\AEM>$JAVA_OPTS="-ea" ./gradlew clean assembleRelease --no-daemon --stacktrace
'$JAVA_OPTS' is not recognized as an internal or external command,
operable program or batch file.
F:\Development\AS\AEM>JAVA_OPTS="-ea" ./gradlew clean assembleRelease --no-daemon --stacktrace
'JAVA_OPTS' is not recognized as an internal or external command,
operable program or batch file.
ch...@google.com <ch...@google.com> #24
Please try to run the command without '$' in front.
ch...@google.com <ch...@google.com> #25
Sorry, I was a bit too fast. Since you are on Windows, could you try:
set JAVA_OPTS="-ea"
gradlew.bat clean assembleRelease --no-daemon --stacktrace
set JAVA_OPTS="-ea"
gradlew.bat clean assembleRelease --no-daemon --stacktrace
ex...@gmail.com <ex...@gmail.com> #26
Thanks:
F:\Development\AS\AEM> set JAVA_OPTS="-ea"
F:\Development\AS\AEM>gradlew.bat clean assembleRelease --no-daemon --stacktrace
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon:https://docs.gradle.org/5.1.1/userguide/gradle_daemon.html .
FAILURE: Build failed with an exception.
* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon athttps://docs.gradle.org/5.1.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 3166208KB object heap
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.GradleException: Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon athttps://docs.gradle.org/5.1.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 3166208KB object heap
at org.gradle.launcher.daemon.client.DaemonGreeter.parseDaemonOutput(DaemonGreeter.java:35)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:178)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:140)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.doStartDaemon(DefaultDaemonConnector.java:212)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startSingleUseDaemon(DefaultDaemonConnector.java:237)
at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:52)
at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:38)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:55)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:207)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:403)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:376)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:37)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:23)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:369)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:299)
at org.gradle.launcher.Main.doAction(Main.java:36)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
I have 16GB of RAM in my machine
F:\Development\AS\AEM> set JAVA_OPTS="-ea"
F:\Development\AS\AEM>gradlew.bat clean assembleRelease --no-daemon --stacktrace
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon:
FAILURE: Build failed with an exception.
* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 3166208KB object heap
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.GradleException: Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 3166208KB object heap
at org.gradle.launcher.daemon.client.DaemonGreeter.parseDaemonOutput(DaemonGreeter.java:35)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:178)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:140)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.doStartDaemon(DefaultDaemonConnector.java:212)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startSingleUseDaemon(DefaultDaemonConnector.java:237)
at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:52)
at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:38)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:55)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:207)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:403)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:376)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:37)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:23)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:369)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:299)
at org.gradle.launcher.Main.doAction(Main.java:36)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
I have 16GB of RAM in my machine
mk...@google.com <mk...@google.com> #27
Regarding #13, is -applymapping used? The multiple entries are exactly the same as the ones listed in b/131349062 .
ex...@gmail.com <ex...@gmail.com> #28
Never heard of that, so no.
mk...@google.com <mk...@google.com> #29
We really need the stacktrace in order for us to start reproducing the issue. You can try out the following:
1) Modify/remove/change the arguments in your build.gradle file for org.gradle.jvmargs to allow reserving the space or use defaults.
2) Disable instant-run if that option is enabled
3) Make sure the JVM is the same
4) instead of using set JAVA_OPTS, add -ea to the arguments in org.gradle.jvmargs. (It may overwrite the settings in org.gradle.jvmargs on Windows)
I am looping in Ivan (gavra@) to see if has any pointers on the gradle error.
1) Modify/remove/change the arguments in your build.gradle file for org.gradle.jvmargs to allow reserving the space or use defaults.
2) Disable instant-run if that option is enabled
3) Make sure the JVM is the same
4) instead of using set JAVA_OPTS, add -ea to the arguments in org.gradle.jvmargs. (It may overwrite the settings in org.gradle.jvmargs on Windows)
I am looping in Ivan (gavra@) to see if has any pointers on the gradle error.
ex...@gmail.com <ex...@gmail.com> #30
1) Please tell me how to do that
2) it wasn't enabled
3) ?
4) I have no org.gradle.jvmargs in my .gradle files. Where should I add it?
2) it wasn't enabled
3) ?
4) I have no org.gradle.jvmargs in my .gradle files. Where should I add it?
ex...@gmail.com <ex...@gmail.com> #31
Sorry, found org.gradle.jvmargs, I'll check it out
ex...@gmail.com <ex...@gmail.com> #32
Ok, progress. With the latest r8.jar from this thread:
classpath files("C:\\Users\\dwr\\Downloads\\r8.jar") // Must be before the Gradle Plugin for Android.
classpath 'com.android.tools.build:gradle:3.4.1'
I get:
java.lang.IllegalArgumentException: Multiple entries with same key: Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String=Encoded method Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String and Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String=Encoded method Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String
With just classpath 'com.android.tools.build:gradle:3.4.1' it seems to work fine now. So there probably was a change between 3.4.0 and 3.4.1 that fixed it.
I also had a maxheapsize in org.gradle.jvmargs, which I've taken out. Although it builds with it enabled, I just took it out anyway.
The only question that remains is that I have to add
-keepattributes InnerClasses
to the proguard.cfg file with R8. Does that mean that more code is visible compared to the original Proguard?
classpath files("C:\\Users\\dwr\\Downloads\\r8.jar") // Must be before the Gradle Plugin for Android.
classpath 'com.android.tools.build:gradle:3.4.1'
I get:
java.lang.IllegalArgumentException: Multiple entries with same key: Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String=Encoded method Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String and Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String=Encoded method Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String
With just classpath 'com.android.tools.build:gradle:3.4.1' it seems to work fine now. So there probably was a change between 3.4.0 and 3.4.1 that fixed it.
I also had a maxheapsize in org.gradle.jvmargs, which I've taken out. Although it builds with it enabled, I just took it out anyway.
The only question that remains is that I have to add
-keepattributes InnerClasses
to the proguard.cfg file with R8. Does that mean that more code is visible compared to the original Proguard?
mk...@google.com <mk...@google.com> #33
Great that we are closer to a solution.
Regarding InnerClasses, it means that one can observe if a class was an inner class of another class. We require the attribute if there is inner classes and you have the signature EnclosingMethods or Signature kept.
I will close the bug - feel free to open it if you experience the error again. Thank you for using R8.
Regarding InnerClasses, it means that one can observe if a class was an inner class of another class. We require the attribute if there is inner classes and you have the signature EnclosingMethods or Signature kept.
I will close the bug - feel free to open it if you experience the error again. Thank you for using R8.
Description
5.1.1
Android Plugin Version:
3.4.0
Module Compile Sdk Version:
26
Module Build Tools Version:
28.0.3
Android SDK Tools version:
26.1.1
Updated to Android Studio 3.4, com.android.tools.build:gradle:3.4.0, distributionUrl=https\://
Getting this when generating a signed build:
Current version is: 1.4.77 (build b74371231cb896b02f83285efb055b7c00ff64d8 from go/r8bot (luci-r8-ci-archive-0-eqqf)).
AGPBI: {"kind":"error","text":"Undefined value encountered during compilation. This is typically caused by invalid dex input that uses a register that is not define on all control-flow paths leading to the use.","sources":[{}],"tool":"D8"}
> Task :AEMobileFull:transformClassesAndResourcesWithR8ForRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':AEMobileFull:transformClassesAndResourcesWithR8ForRelease'.
> com.android.tools.r8.CompilationFailedException: Compilation failed to complete