WAI
Status Update
Comments
sh...@google.com <sh...@google.com> #2
This looks like a regression from AGP 3.4 to AGP 3.5. Ian, can you have a first look?
ac...@regaltechsupport.com <ac...@regaltechsupport.com> #3
Comment has been deleted.
[Deleted User] <[Deleted User]> #4
Reassigning to Ivan as this is looking like a build issue and I'm not sure if the project configuration needs changing or there is an error in the build system.
Running:
./gradlew :quickstartKotlin:assembleDebug --info
yields output with:
<snip>/.gradle/caches/transforms-2/files-2.1/a4e476e9d975337caa4d7a965148dce1/video-android-4.2.0/jars/classes.jar: D8: Type `org.webrtc.EglBase` was not found, it is required for default or static interface methods desugaring of `void com.twilio.video.EglBaseProvider.<init>()`
More info:
The application has a dependency on com.twilio:video-android:4.2.0 and it appears to include a copy of webrtc somehow. Found it locally in .gradle/caches/transforms-2/files-2.1/HASH/video-android-4.2.0/jars/libs/libwebrtc.jar
The definition of type com.twilio.video.EglBaseProvider in video-android-4.2.0 has an <init> with a static invoke to EglBase::create.
The interface org.webrtc.EglBase is defined in libwebrtc.jar
Outside of gradle, putting libwebrtc.jar in the program path or the classpath when compiling with D8 and a min-api to desugar default interface methods, the call to EglBase::create is correctly rewritten to EglBase$-CC::create.
Running:
./gradlew :quickstartKotlin:assembleDebug --info
yields output with:
<snip>/.gradle/caches/transforms-2/files-2.1/a4e476e9d975337caa4d7a965148dce1/video-android-4.2.0/jars/classes.jar: D8: Type `org.webrtc.EglBase` was not found, it is required for default or static interface methods desugaring of `void com.twilio.video.EglBaseProvider.<init>()`
More info:
The application has a dependency on com.twilio:video-android:4.2.0 and it appears to include a copy of webrtc somehow. Found it locally in .gradle/caches/transforms-2/files-2.1/HASH/video-android-4.2.0/jars/libs/libwebrtc.jar
The definition of type com.twilio.video.EglBaseProvider in video-android-4.2.0 has an <init> with a static invoke to EglBase::create.
The interface org.webrtc.EglBase is defined in libwebrtc.jar
Outside of gradle, putting libwebrtc.jar in the program path or the classpath when compiling with D8 and a min-api to desugar default interface methods, the call to EglBase::create is correctly rewritten to EglBase$-CC::create.
[Deleted User] <[Deleted User]> #5
As a workaround you can add "android.enableDexingArtifactTransform.desugaring=false" to gradle.properties.
In Android Gradle Plugin 3.5 we started dexing and desugaring using Gradle artifact transforms. This allows us to use Gradle caching and parallelism. The way we set up desugaring classpath is by using dependencies information from the POM file. In this case, "video-android-4.2.0" packages libwebrtc.jar inside the AAR and we fail to add those files to desugaring classpath. D8 is unable to resolve types and to rewrite invocation to the generated companion class.
In Android Gradle Plugin 3.5 we started dexing and desugaring using Gradle artifact transforms. This allows us to use Gradle caching and parallelism. The way we set up desugaring classpath is by using dependencies information from the POM file. In this case, "video-android-4.2.0" packages libwebrtc.jar inside the AAR and we fail to add those files to desugaring classpath. D8 is unable to resolve types and to rewrite invocation to the generated companion class.
[Deleted User] <[Deleted User]> #6
Note, I am facing the same issue in an app that uses a library, lets call it libraryB, that make use of webrtc but I don't include webrtc.jar in libraryB, as I use implementation configuration for libraryB. I then generates an AAR of it and import this AAR as a module to make use of it on final app. Therefore in app's build.gradle file I also import webrtc as implementation.
I have attached an android project so you can reproduce this case. webrtclibAAR module is an AAR file generated by running gradle assemble task on webrtclib module
I have attached an android project so you can reproduce this case. webrtclibAAR module is an AAR file generated by running gradle assemble task on webrtclib module
wi...@mcdbeau.me <wi...@mcdbeau.me> #7
Continuing my last comment:
Also I've noticed that uploading libraryB to a Nexus Server instead of using AAR as a module works properly
Also I've noticed that uploading libraryB to a Nexus Server instead of using AAR as a module works properly
ac...@regaltechsupport.com <ac...@regaltechsupport.com> #8
The issue is that we need AAR to have POM alongside to contain all dependency information. When just dropping an AAR to an output directory, this information is lost. However, when publishing to a Maven repo, this information exists.
Also, this is not exactly the same issue as the original reporter reported, but I hope my answer helps :)
Also, this is not exactly the same issue as the original reporter reported, but I hope my answer helps :)
gc...@gmail.com <gc...@gmail.com> #9
Comment has been deleted.
[Deleted User] <[Deleted User]> #10
Never mind, this is still an issue. We found a false positive in our testing that led us to believe building video-android with gradle plugin 3.5.0 resolved the crash. It is definitely related to storing the AAR to our artifact repository in Bintray. As a sanity check we referenced the AAR locally and it works fine.
Also, thank you for sharing the workaround above! We tested adding that line to the quickstartKotlin's gradle.properties file and it resolved the crash. We'll use this as a temporary solution in the meantime.
(Used a different email address here, sorry for the confusion)
Also, thank you for sharing the workaround above! We tested adding that line to the quickstartKotlin's gradle.properties file and it resolved the crash. We'll use this as a temporary solution in the meantime.
(Used a different email address here, sorry for the confusion)
kp...@weareoko.com <kp...@weareoko.com> #11
Also, are there plans to resolve dependencies that are packaged outside of what's specified in a POM file within the AAR? Or would we need to ensure that a POM file is always present defining dependencies like libwebrtc.jar? Our team would like to know so we can either prioritize this work or wait for the next release of the Gradle plugin. Thanks!
sh...@google.com <sh...@google.com> #12
We will handle jars packaged under libs directory in an AAR, so there is no need to add those in the POM file. cmw@ fixed that in 3.6 (he can add more details when it got fixed), so that should work, and there is no need to add e.g. libwebrtc.jar to the POM file.
[Deleted User] <[Deleted User]> #13
I think this is fixed in 3.6.0-alpha05 by
https://android.googlesource.com/platform/tools/base/+/f7f446e6c304b035e347eccd181e2b6ee4b16d97#
which merges all of the the libs jars from the AAR into one jar rather than exporting all of them separately, meaning that the classes in an AAR are all desugared together.
which merges all of the the libs jars from the AAR into one jar rather than exporting all of them separately, meaning that the classes in an AAR are all desugared together.
wi...@mcdbeau.me <wi...@mcdbeau.me> #14
Great! Thank you for the update on this.
sh...@google.com <sh...@google.com> #15
I'm afraid this is not solved yet. Before my last comment (https://issuetracker.google.com/issues/140508065#comment6 ) I've tested it on Android Studio Canary with 3.6.0-alpha10, and I took the same error.
sh...@google.com <sh...@google.com> #16
That is a subtly different issue, as you are not embedding the AAR. In general please file separate issues.
Your issue is that you've lost the dependency information by importing the aar as a subproject. I wish we didn't have a template for that as it leads to issues like this.
The way to solve your issue is to publish the AAR to e.g. a local maven repository so the dependency information is preserved and everything will work.
Your issue is that you've lost the dependency information by importing the aar as a subproject. I wish we didn't have a template for that as it leads to issues like this.
The way to solve your issue is to publish the AAR to e.g. a local maven repository so the dependency information is preserved and everything will work.
[Deleted User] <[Deleted User]> #17
Any update on this? This still isn't resolved in 3.5.1 and I'm stuck on the older version still. Several people in this thread have the same issue and are waiting for this to be resolved.
https://github.com/twilio/video-quickstart-android/issues/430
Description
Please provide as much information as possible. At least, this should include a description of your issue and steps to reproduce the problem. If possible please provide a summary of what steps or workarounds you have already tried, and any docs or articles you found (un)helpful.
Problem you have encountered:
I have deployed an flask app in Google App Engine. The app is using the Postgresql (Cloud SQL), when the instance of the app start , it shows warning some like "Throttling refreshCfg(database instance name): it was only called 72.969µs ago"
What you expected to happen:
It should not show, as before few days it was not showing anything like this.
Steps to reproduce:
Try with deploying the which is using postresql database in the google app engine.
Other information (workarounds you have tried, documentation consulted, etc): I have tried by chnaging few things of db confing but nothing worked. Please suggest something.