Status Update
Comments
ve...@google.com <ve...@google.com>
ve...@google.com <ve...@google.com> #2
ar...@gmail.com <ar...@gmail.com> #3
ve...@google.com <ve...@google.com>
pr...@google.com <pr...@google.com> #4
ar...@gmail.com <ar...@gmail.com> #5
so...@gmail.com <so...@gmail.com> #7
Could not find com.google.firebase:firebase-plugins:1.1.5.
Searched in the following locations:
-
-
-
-
ar...@gmail.com <ar...@gmail.com> #8
* Where:
Build file '/home/patricio/infomigra_app/platforms/android/build.gradle' line: 95
* What went wrong:
A problem occurred evaluating root project 'android'.
> Could not resolve all dependencies for configuration 'classpath'.
> Could not find any matches for com.android.tools.build:gradle:+ as no versions of com.android.tools.build:gradle are available.
Searched in the following locations:
file:/home/patricio/.m2/repository/com/android/tools/build/gradle/maven-metadata.xml
file:/home/patricio/.m2/repository/com/android/tools/build/gradle/
Required by:
unspecified:unspecified:unspecified
pu...@gmail.com <pu...@gmail.com> #9
14:05:31 > Could not resolve all artifacts for configuration ':classpath'.
14:05:31 > Could not find com.google.gms:google-services:4.0.1.
14:05:31 Searched in the following locations:
14:05:31 - file:/var/lib/jenkins/.m2/repository/com/google/gms/google-services/4.0.1/google-services-4.0.1.pom
14:05:31 - file:/var/lib/jenkins/.m2/repository/com/google/gms/google-services/4.0.1/google-services-4.0.1.jar
14:05:31 -
14:05:31 -
14:05:31 -
14:05:31 -
14:05:31 -
14:05:31 -
su...@google.com <su...@google.com> #10
pu...@gmail.com <pu...@gmail.com> #11
> Could not find com.google.ads.mediation:mopub:4.15.0.0.
Searched in the following locations:
Could not find com.google.ads.interactivemedia.v3:interactivemedia:3.6.0.
Searched in the following locations:
jo...@gmail.com <jo...@gmail.com> #12
ja...@gmail.com <ja...@gmail.com> #13
ab...@gmail.com <ab...@gmail.com> #14
ar...@gmail.com <ar...@gmail.com> #15
ka...@gmail.com <ka...@gmail.com> #16
[21:49:48][Step 1/2] * What went wrong:
[21:49:48][Step 1/2] Could not resolve all files for configuration ':app:devDebugCompileClasspath'.
[21:49:48][Step 1/2] > Could not find com.google.android:flexbox:0.2.7.
[21:49:48][Step 1/2] Searched in the following locations:
[21:49:48][Step 1/2] file:/opt/android-sdk/extras/m2repository/com/google/android/flexbox/0.2.7/flexbox-0.2.7.pom
[21:49:48][Step 1/2] file:/opt/android-sdk/extras/m2repository/com/google/android/flexbox/0.2.7/flexbox-0.2.7.jar
[21:49:48][Step 1/2] file:/opt/android-sdk/extras/google/m2repository/com/google/android/flexbox/0.2.7/flexbox-0.2.7.pom
[21:49:48][Step 1/2] file:/opt/android-sdk/extras/google/m2repository/com/google/android/flexbox/0.2.7/flexbox-0.2.7.jar
[21:49:48][Step 1/2] file:/opt/android-sdk/extras/android/m2repository/com/google/android/flexbox/0.2.7/flexbox-0.2.7.pom
[21:49:48][Step 1/2] file:/opt/android-sdk/extras/android/m2repository/com/google/android/flexbox/0.2.7/flexbox-0.2.7.jar
[21:49:48][Step 1/2]
[21:49:48][Step 1/2]
[21:49:48][Step 1/2] 1 actionable task: 1 executed
[21:49:48][Step 1/2]
[21:49:48][Step 1/2]
[21:49:48][Step 1/2]
[21:49:48][Step 1/2]
[21:49:48][Step 1/2]
[21:49:48][Step 1/2]
[21:49:48][Step 1/2] Required by:
[21:49:48][Step 1/2] project :app
[21:49:48][Step 1/2]
[21:49:48][Step 1/2] * Try:
mb...@gmail.com <mb...@gmail.com> #17
pu...@gmail.com <pu...@gmail.com> #18
coz if this is likely gonna be fixed in the next day or two, then we can wait, otherwise will have to go with some temporary hack solutions
ya...@gmail.com <ya...@gmail.com> #19
jb...@gmail.com <jb...@gmail.com> #20
This is interesting and worrying...
vi...@gmail.com <vi...@gmail.com> #21
ha...@gmail.com <ha...@gmail.com> #22
es...@gmail.com <es...@gmail.com> #23
It is severely irresponsible to pull binaries out of a central repo that everyone uses without a) giving them a big heads up and b) proving a seamless alternative.
In terms of a) Google did this without letting anyone know so they could plan ahead.
As far as b) is concerned, some of the artifacts they pulled form JCenter are not even provided via google()! ExoPlayer was the one which bit us. We have to manually add exoplayer's bintray in our repos.
This was handled VERY poorly and cost hundreds of project maintainers around the world precious time troubleshooting chasing down the root of this.
This is time and money wasted that won't be taken back.
I'm surprised at the unprofessionalism with this whole affair.
si...@gmail.com <si...@gmail.com> #24
sc...@gmail.com <sc...@gmail.com> #25
This is a workaround.
What are the plans and timelines in getting all the repos that are missing from google() into that repository?
You can't expect hundreds or thousands of project maintainers around the world to scramble around trying to fix their builds like that.
Bintray here says that Google asked them to pull the binaries from JCenter. The comment above implies that they will return to JCenter?
Which one is it?
If they don't make it to JCenter, will they make it to google()?
ad...@gmail.com <ad...@gmail.com> #26
If you're going to insist that mirrors be taken down, it's worth making sure your own dependency delivery is bulletproof.
sc...@gmail.com <sc...@gmail.com> #27
We understand this is a really painful situation right now for a lot of developers. Removing packages from jCenter which are not replicated in Google's maven repo was an accident and a product of a miscommunication! We're working on getting everything back into place.
Please try and be patient with us and let's try and reserve comments on this thread for updates on the situation. If you're affected by this issue and want to be heard, please click "Me too!" at the top of the page as a way of 'upvoting' this issue.
- Sam
co...@alexjdolan.com <co...@alexjdolan.com> #28
Even something that is in no way guaranteed - just a "we hope it's resolved by.."? :) . This is a frustrating situation for everyone involved, and it's be great to have some sort of idea of if we need to add in the work-arounds or if it's going to be possible to wait for the correct resolution.
Thanks!
co...@alexjdolan.com <co...@alexjdolan.com> #29
pt...@gmail.com <pt...@gmail.com> #30
We now know what happened, and are working on rolling it back in a sensible way. Here's a basic outline of the problem:
1. There were some bogus/malformed com.google.* and com.android.* artifacts on jCenter
2. Most of these artifacts were properly hosted on
3. If your build system found the jCenter version before it found the Google Maven version, your build would break
4. Google noticed this and asked jFrog to remove basically everything under com.google.* and com.android.* because we assumed it was all on Google Maven as well
5. We were wrong :-(
6. Some artifacts deleted from jCenter are causing errors in your builds
We are working on doing a few things:
* Some libraries that were deleted are being pushed to Google Maven. This includes the com.google.gms:google-services plugin, the firebase performance plugin, and Exoplayer. Try adding google() to your buildscript and app repositories blocks to see if that helps. We expect this to help many people, but not everyone.
* We are working to make a list of which libraries were improperly deleted. Some of the things deleted in step #4 above were done for good reason, so we don't want to restore those as well.
As I said before, we hate that we broke your builds and we appreciate your patience while we fix it!
- Sam
pi...@gmail.com <pi...@gmail.com> #31
kk...@gmail.com <kk...@gmail.com> #32
Do you have any updates regarding the other libraries?
al...@gmail.com <al...@gmail.com> #33
A problem occurred configuring project ':react-native-firebase'.
> Could not resolve all artifacts for configuration ':react-native-firebase:classpath'.
> Could not find com.android.tools.build:gradle:2.3.3.
Searched in the following locations:
Required by:
project :react-native-firebase
to...@gmail.com <to...@gmail.com> #34
jc...@gmail.com <jc...@gmail.com> #35
bn...@gmail.com <bn...@gmail.com> #36
- The Google Services library (com.google.gms:google-services) library has been restored, see update #31.
- Requests have been submitted to jCenter to re-publish all repositories hosted on
- Some Android/Firebase libraries that were dual-homed on both
### WORKAROUNDS ###
1. For the Google Services library, no workaround is necessary. This library is already restored. Other libraries in /google are in the progress of being restored as well.
2. For projects served from
3. For projects from
repositories {
maven {
url "
}
}
Replace $(REPOSITORY) with the project name from
For
Again, this workaround is only temporary until we can get all versions either re-listed in jCenter or mirrored into
### INVESTIGATION ###
The request submitted to de-list projects from jCenter appears to have been overly broad, and was submitted by another team at Google that did not have full authority to make that change. The repository admins at Google were not consulted before this request was executed by jCenter. We'll be looking into this more in the days to come, right now our first priority is in restoring access to all versions of affected libraries.
Additionally, it appears that there may be a misconfiguration in Google's repository that is preventing mirroring from
we...@gmail.com <we...@gmail.com> #37
We're using flexbox library and exoplayer.
But we can't download these libraries from jCenter.
to...@gmail.com <to...@gmail.com> #38
Why there is no channel/website that tells the status of a service? That'd the first site that devs can go to and checks if something's wrong on repo side, instead wasting time trying to figure out what they did wrong.
sa...@gmail.com <sa...@gmail.com> #39
Searched in the following locations:
I am still struggling with this
ja...@gmail.com <ja...@gmail.com> #40
> Could not find google-services.jar (com.google.gms:google-services:4.1.0).
Searched in the following locations:
ak...@gmail.com <ak...@gmail.com> #41
ke...@gmail.com <ke...@gmail.com> #42
cc...@gmail.com <cc...@gmail.com> #44
We have to wait until artifacts will be uploaded again.
In meantime, use workaround provided by google.
For example, having problem with `android/tools`, use this:
maven {
artifactUrls "
url "
}
jl...@gmail.com <jl...@gmail.com> #45
exoplayer, flexbox, gsom / json-simple, protobuf, guava, maybe others I'm missing?
It might require some communication internally (to get permissions / access) but that should be doable inside one and same company right?
a....@gmail.com <a....@gmail.com> #46
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
> Could not find gradle.jar (com.android.tools.build:gradle:2.2.3).
Searched in the following locations:
> Could not find gradle-core.jar (com.android.tools.build:gradle-core:2.2.3).
Searched in the following locations:
> Could not find builder.jar (com.android.tools.build:builder:2.2.3).
Searched in the following locations:
> Could not find lint.jar (com.android.tools.lint:lint:25.2.3).
Searched in the following locations:
> Could not find gradle-api.jar (com.android.tools.build:gradle-api:2.2.3).
Searched in the following locations:
> Could not find compilerCommon.jar (com.android.databinding:compilerCommon:2.2.3).
Searched in the following locations:
> Could not find builder-model.jar (com.android.tools.build:builder-model:2.2.3).
Searched in the following locations:
> Could not find builder-test-api.jar (com.android.tools.build:builder-test-api:2.2.3).
Searched in the following locations:
> Could not find sdklib.jar (com.android.tools:sdklib:25.2.3).
Searched in the following locations:
> Could not find sdk-common.jar (com.android.tools:sdk-common:25.2.3).
Searched in the following locations:
> Could not find common.jar (com.android.tools:common:25.2.3).
Searched in the following locations:
> Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:25.2.3).
Searched in the following locations:
> Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:25.2.3).
Searched in the following locations:
> Could not find protos.jar (com.android.tools.analytics-library:protos:25.2.3).
Searched in the following locations:
> Could not find shared.jar (com.android.tools.analytics-library:shared:25.2.3).
Searched in the following locations:
> Could not find tracker.jar (com.android.tools.analytics-library:tracker:25.2.3).
Searched in the following locations:
> Could not find lint-checks.jar (com.android.tools.lint:lint-checks:25.2.3).
Searched in the following locations:
> Could not find baseLibrary.jar (com.android.databinding:baseLibrary:2.2.3).
Searched in the following locations:
> Could not find layoutlib-api.jar (com.android.tools.layoutlib:layoutlib-api:25.2.3).
Searched in the following locations:
> Could not find dvlib.jar (com.android.tools:dvlib:25.2.3).
Searched in the following locations:
> Could not find repository.jar (com.android.tools:repository:25.2.3).
Searched in the following locations:
> Could not find lint-api.jar (com.android.tools.lint:lint-api:25.2.3).
Searched in the following locations:
> Could not find annotations.jar (com.android.tools:annotations:25.2.3).
Searched in the following locations:
do...@gmail.com <do...@gmail.com> #47
Could not find com.google.android:flexbox:1.0.0.
Could not find com.android.databinding:baseLibrary:2.2.3.
Could not find com.google.android.exoplayer:exoplayer-smoothstreaming:2.9.1.
la...@gmail.com <la...@gmail.com> #48
* What went wrong:
> Could not find any matches for com.android.tools.build:gradle:2.3.+ as no versions of com.android.tools.build:gradle are available.
Searched in the following locations:
ph...@googlemail.com <ph...@googlemail.com> #49
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find recyclerview-v7.jar (com.android.support:recyclerview-v7:28.0.0).
Searched in the following locations:
dp...@gmail.com <dp...@gmail.com> #50
> Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.0.1).
Searched in the following locations:
> Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:26.0.1).
Searched in the following locations:
> Could not find dvlib.jar (com.android.tools:dvlib:26.0.1).
Searched in the following locations:
> Could not find common.jar (com.android.tools:common:26.0.1).
Searched in the following locations:
js...@gmail.com <js...@gmail.com> #51
dp...@gmail.com <dp...@gmail.com> #52
Could not find any matches for com.android.tools.build:gradle:2.3.+ as no versions of com.android.tools.build:gradle are available.
Searched in the following locations:
Required by:
pastavia:react-native-vector-icons:unspecified
sk...@gmail.com <sk...@gmail.com> #53
he...@gmail.com <he...@gmail.com> #54
tr...@trinition.org <tr...@trinition.org> #55
st...@gmail.com <st...@gmail.com> #56
> Could not resolve all files for configuration 'classpath'.
> Could not find any matches for com.android.tools.build:gradle:2.3.+ as no versions of com.android.tools.build:gradle are available.
Searched in the following locations:
su...@google.com <su...@google.com> #57
I'm still getting the following errors..
BUILD FAILED
Total time: 0.551 secs
/home/patricio/infomigra_app/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
> Could not find gradle.jar (com.android.tools.build:gradle:2.2.3).
Searched in the following locations:
> Could not find gradle-core.jar (com.android.tools.build:gradle-core:2.2.3).
Searched in the following locations:
> Could not find builder.jar (com.android.tools.build:builder:2.2.3).
Searched in the following locations:
> Could not find lint.jar (com.android.tools.lint:lint:25.2.3).
Searched in the following locations:
> Could not find gradle-api.jar (com.android.tools.build:gradle-api:2.2.3).
Searched in the following locations:
> Could not find compilerCommon.jar (com.android.databinding:compilerCommon:2.2.3).
Searched in the following locations:
> Could not find builder-model.jar (com.android.tools.build:builder-model:2.2.3).
Searched in the following locations:
> Could not find builder-test-api.jar (com.android.tools.build:builder-test-api:2.2.3).
Searched in the following locations:
> Could not find sdklib.jar (com.android.tools:sdklib:25.2.3).
Searched in the following locations:
> Could not find sdk-common.jar (com.android.tools:sdk-common:25.2.3).
Searched in the following locations:
> Could not find common.jar (com.android.tools:common:25.2.3).
Searched in the following locations:
> Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:25.2.3).
Searched in the following locations:
> Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:25.2.3).
Searched in the following locations:
> Could not find protos.jar (com.android.tools.analytics-library:protos:25.2.3).
Searched in the following locations:
> Could not find shared.jar (com.android.tools.analytics-library:shared:25.2.3).
Searched in the following locations:
> Could not find tracker.jar (com.android.tools.analytics-library:tracker:25.2.3).
Searched in the following locations:
> Could not find lint-checks.jar (com.android.tools.lint:lint-checks:25.2.3).
Searched in the following locations:
> Could not find baseLibrary.jar (com.android.databinding:baseLibrary:2.2.3).
Searched in the following locations:
> Could not find layoutlib-api.jar (com.android.tools.layoutlib:layoutlib-api:25.2.3).
Searched in the following locations:
> Could not find dvlib.jar (com.android.tools:dvlib:25.2.3).
Searched in the following locations:
> Could not find repository.jar (com.android.tools:repository:25.2.3).
Searched in the following locations:
> Could not find lint-api.jar (com.android.tools.lint:lint-api:25.2.3).
Searched in the following locations:
> Could not find annotations.jar (com.android.tools:annotations:25.2.3).
Searched in the following locations:
an...@gmail.com <an...@gmail.com> #58
cg...@gmail.com <cg...@gmail.com> #59
Searched in the following locations:
file:/C:/Users/Shantanu/.m2/repository/com/android/tools/build/gradle/maven-metadata.xml
file:/C:/Users/Shantanu/.m2/repository/com/android/tools/build/gradle/
Required by:
unspecified:unspecified:unspecified
he...@gmail.com <he...@gmail.com> #60
an...@googlemail.com <an...@googlemail.com> #61
sz...@gmail.com <sz...@gmail.com> #62
A problem occurred configuring project ':react-native-vector-icons'.
> Could not resolve all files for configuration ':react-native-vector-icons:classpath'.
> Could not find any matches for com.android.tools.build:gradle:2.3.+ as no versions of com.android.tools.build:gradle are available.
Searched in the following locations:
Required by:
project :react-native-vector-icons
sa...@gmail.com <sa...@gmail.com> #63
vi...@gmail.com <vi...@gmail.com> #64
buildscript {
repositories {
jcenter()
maven {
url "
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
url '
}
}
}
subprojects { subproject ->
if (subproject.name.contains('react-native-vector-icons') ||
subproject.name.contains('react-native-image-picker') ||
subproject.name.contains('react-native-linear-gradient') ||
subproject.name.contains('rn-fetch-blob') ||
subproject.name.contains('react-native-image-resizer')){
buildscript {
repositories {
maven { url "
}
}
}
}
ak...@gmail.com <ak...@gmail.com> #65
Using phonegap-version cli-8.1.1 should have that fix
bb...@gmail.com <bb...@gmail.com> #66
I'm still getting these errors:
BUILD FAILED
Total time: 0.618 secs
/home/patricio/infomigra_app/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
> Could not find gradle.jar (com.android.tools.build:gradle:2.2.3).
Searched in the following locations:
> Could not find gradle-core.jar (com.android.tools.build:gradle-core:2.2.3).
Searched in the following locations:
> Could not find builder.jar (com.android.tools.build:builder:2.2.3).
Searched in the following locations:
> Could not find lint.jar (com.android.tools.lint:lint:25.2.3).
Searched in the following locations:
> Could not find gradle-api.jar (com.android.tools.build:gradle-api:2.2.3).
Searched in the following locations:
> Could not find compilerCommon.jar (com.android.databinding:compilerCommon:2.2.3).
Searched in the following locations:
> Could not find builder-model.jar (com.android.tools.build:builder-model:2.2.3).
Searched in the following locations:
> Could not find builder-test-api.jar (com.android.tools.build:builder-test-api:2.2.3).
Searched in the following locations:
> Could not find sdklib.jar (com.android.tools:sdklib:25.2.3).
Searched in the following locations:
> Could not find sdk-common.jar (com.android.tools:sdk-common:25.2.3).
Searched in the following locations:
> Could not find common.jar (com.android.tools:common:25.2.3).
Searched in the following locations:
> Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:25.2.3).
Searched in the following locations:
> Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:25.2.3).
Searched in the following locations:
> Could not find protos.jar (com.android.tools.analytics-library:protos:25.2.3).
Searched in the following locations:
> Could not find shared.jar (com.android.tools.analytics-library:shared:25.2.3).
Searched in the following locations:
> Could not find tracker.jar (com.android.tools.analytics-library:tracker:25.2.3).
Searched in the following locations:
> Could not find lint-checks.jar (com.android.tools.lint:lint-checks:25.2.3).
Searched in the following locations:
> Could not find baseLibrary.jar (com.android.databinding:baseLibrary:2.2.3).
Searched in the following locations:
> Could not find layoutlib-api.jar (com.android.tools.layoutlib:layoutlib-api:25.2.3).
Searched in the following locations:
> Could not find dvlib.jar (com.android.tools:dvlib:25.2.3).
Searched in the following locations:
> Could not find repository.jar (com.android.tools:repository:25.2.3).
Searched in the following locations:
> Could not find lint-api.jar (com.android.tools.lint:lint-api:25.2.3).
Searched in the following locations:
> Could not find annotations.jar (com.android.tools:annotations:25.2.3).
Searched in the following locations:
ho...@gmail.com <ho...@gmail.com> #67
Where do you put this code?
buildscript {
repositories {
jcenter()
maven {
url "
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
}
}
...
sn...@gmail.com <sn...@gmail.com> #68
lu...@gmail.com <lu...@gmail.com> #69
aa...@gmail.com <aa...@gmail.com> #70
ms...@gmail.com <ms...@gmail.com> #71
buildscript {
repositories {
maven { url '
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
}
}
Adding `maven { url '
mj...@gmail.com <mj...@gmail.com> #72
* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> Could not resolve all files for configuration ':CordovaLib:classpath'.
> Could not find com.android.tools.build:gradle:2.2.3.
Searched in the following locations:
Required by:
project :CordovaLib
wo...@gmail.com <wo...@gmail.com> #73
1. Find the github repo for any submodule that is broken and fork it to our own repo.
2. Changing the build.gradle in our fork'ed version to have the fix
3. Updating our yarn files to pull the module from our forked version
And then undoing this once it is fixed...
fr...@elitists.org <fr...@elitists.org> #74
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:2.2.3.
Searched in the following locations:
Required by:
project :
al...@gmail.com <al...@gmail.com> #75
> Could not find com.android.tools.build:gradle:2.2.3.
Searched in the following locations:
Required by:
project :react-native-blur
ja...@gmail.com <ja...@gmail.com> #76
av...@gmail.com <av...@gmail.com> #77
The issue is already being worked on, it has Severity S1 and Priority P0.
You can "Star" the issue at the top to receive update notifications.
ta...@gmail.com <ta...@gmail.com> #78
Would be great to get an ETA on when this could be sorted out.
Is there any kind of official press release about this, so it can be communicated to the business?
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:2.3.3.
Searched in the following locations:
mi...@gmail.com <mi...@gmail.com> #79
ju...@gmail.com <ju...@gmail.com> #80
el...@gmail.com <el...@gmail.com> #81
allprojects {
buildscript {
repositories {
google()
mavenCentral()
jcenter()
// TODO: Remove when Google fixes their issues
maven { url '
}
}
}
NOTE: You also need to add the
"maven { url '
line into your normal buildscript repositories block.
For React Native library maintainers, please stop adding you own buildscript block into your own build.gradle files.
da...@gmail.com <da...@gmail.com> #82
ph...@gmail.com <ph...@gmail.com> #83
jr...@gmail.com <jr...@gmail.com> #84
Yeah, good point. This does help alleviate "dependency hell" :)
ju...@gmail.com <ju...@gmail.com> #85
We are continuing to work with the JFrog team to roll back as much of the deletion as possible and get these packages back on JCenter. We hope this will fix the majority of your build issues. Once we are in a more stable place, we (Google) will work on long-term improvements to our processes to make sure this does not happen again.
For those of you who are using Gradle/Android Studio to build your Android projects you can directly add dependencies on Bintray repositories as a workaround (as Trevor mentioned before). I will list a few specific examples to try and make things as clear as possible.
Note that these
## Android Build Tools (ex: com.android.tools.build:gradle)
In your top level build.gradle file you can add the repository within the buildscript{} block like this:
buildscript {
// ...
repositories {
maven { url '
// ...
// ... everything else ...
// ...
}
// ...
}
## Firebase Plugins (ex: com.google.firebase:firebase-plugins)
In your top level build.gradle file you can add the repository within the buildscript{} block like this:
buildscript {
// ...
repositories {
maven { url '
// ...
// ... everything else ...
// ...
}
// ...
}
## Exoplayer
In your app level build.gradle file you can add the repository in a repositories{} block above your dependencies{} block
android {
// ...
}
repositories {
maven { url '
// ...
// ... everything else ...
// ...
}
dependencies {
// ...
}
## Flexbox
In your app level build.gradle file you can add the repository in a repositories{} block above your dependencies{} block
android {
// ...
}
repositories {
maven { url '
// ...
// ... everything else ...
// ...
}
dependencies {
// ...
}
ha...@gmail.com <ha...@gmail.com> #86
Could not find org.ow2.asm:asm:5.0.4.
Could not find org.ow2.asm:asm-commons:5.0.4.
Could not find net.sf.proguard:proguard-gradle:5.2.1.
Could not find org.jacoco:org.jacoco.core:0.7.5.201505241946.
Could not find org.jacoco:org.jacoco.report:0.7.5.201505241946.
Could not find net.sf.jopt-simple:jopt-simple:4.9.
Could not find com.google.protobuf:protobuf-java:2.5.0.
Could not find org.antlr:antlr:3.5.2.
Could not find com.squareup:javawriter:2.5.0.
Could not find org.bouncycastle:bcpkix-jdk15on:1.48.
Could not find org.bouncycastle:bcprov-jdk15on:1.48.
Could not find org.ow2.asm:asm-tree:5.0.4.
Could not find org.eclipse.jdt.core.compiler:ecj:4.5.1.
Could not find com.google.guava:guava:18.0.
Could not find org.antlr:antlr4:4.5.3.
Could not find commons-io:commons-io:2.4.
Could not find com.googlecode.juniversalchardet:juniversalchardet:1.0.3.
Could not find com.google.code.gson:gson:2.2.4.
Could not find org.apache.commons:commons-compress:1.8.1.
Could not find org.apache.httpcomponents:httpclient:4.1.1.
Could not find org.apache.httpcomponents:httpmime:4.1.
Could not find com.google.guava:guava:18.0.
Could not find net.sf.kxml:kxml2:2.3.0.
Could not find org.ow2.asm:asm-analysis:5.0.4.
Could not find com.intellij:annotations:12.0.
Could not find com.google.jimfs:jimfs:1.1.
ze...@gmail.com <ze...@gmail.com> #87
> Could not find gradle.jar (com.android.tools.build:gradle:2.2.3).
> Could not find gradle-core.jar (com.android.tools.build:gradle-core:2.2.3).
> Could not find builder.jar (com.android.tools.build:builder:2.2.3).
> Could not find lint.jar (com.android.tools.lint:lint:25.2.3).
> Could not find gradle-api.jar (com.android.tools.build:gradle-api:2.2.3).
> Could not find compilerCommon.jar (com.android.databinding:compilerCommon:2.2.3).
> Could not find builder-model.jar (com.android.tools.build:builder-model:2.2.3).
> Could not find builder-test-api.jar (com.android.tools.build:builder-test-api:2.2.3).
> Could not find sdklib.jar (com.android.tools:sdklib:25.2.3).
> Could not find sdk-common.jar (com.android.tools:sdk-common:25.2.3).
> Could not find common.jar (com.android.tools:common:25.2.3).
> Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:25.2.3).
> Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:25.2.3).
> Could not find protos.jar (com.android.tools.analytics-library:protos:25.2.3).
> Could not find shared.jar (com.android.tools.analytics-library:shared:25.2.3).
> Could not find tracker.jar (com.android.tools.analytics-library:tracker:25.2.3).
> Could not find lint-checks.jar (com.android.tools.lint:lint-checks:25.2.3).
> Could not find baseLibrary.jar (com.android.databinding:baseLibrary:2.2.3).
> Could not find layoutlib-api.jar (com.android.tools.layoutlib:layoutlib-api:25.2.3).
> Could not find dvlib.jar (com.android.tools:dvlib:25.2.3).
> Could not find repository.jar (com.android.tools:repository:25.2.3).
> Could not find lint-api.jar (com.android.tools.lint:lint-api:25.2.3).
> Could not find annotations.jar (com.android.tools:annotations:25.2.3).
ma...@gmail.com <ma...@gmail.com> #88
* com.google.firebase:firebase-plugins
* com.google.firebase:crash-plugin
* com.google.firebase:perf-plugin
You should be able to resolve issues with these by adding google() to your buildscript repositories block.
ad...@gmail.com <ad...@gmail.com> #89
> Could not find method google() for arguments [] on repository container.
si...@gmail.com <si...@gmail.com> #90
See here for more information:
me...@gmail.com <me...@gmail.com> #92
I used the url suggested earlier in the thread (
ph...@hotmail.com <ph...@hotmail.com> #93
maven {
url "
}
tc...@gmail.com <tc...@gmail.com> #94
ad...@gmail.com <ad...@gmail.com> #95
couldn't find grandle 3.0
A problem occurred configuring root project 'android'.
[16:46:45][Step 4/5] [ci:build:android-qa ] > Could not resolve all files for configuration ':classpath'.
[16:46:45][Step 4/5] [ci:build:android-qa ] > Could not find com.android.tools.build:gradle:3.0.0.
[16:46:45][Step 4/5] [ci:build:android-qa ] Searched in the following locations:
[16:46:45][Step 4/5] [ci:build:android-qa ]
[16:46:45][Step 4/5] [ci:build:android-qa ]
[16:46:45][Step 4/5] [ci:build:android-qa ]
[16:46:45][Step 4/5] [ci:build:android-qa ]
ha...@gmail.com <ha...@gmail.com> #96
wo...@gmail.com <wo...@gmail.com> #97
mi...@gmail.com <mi...@gmail.com> #98
ch...@gmail.com <ch...@gmail.com> #99
ka...@gmail.com <ka...@gmail.com> #100
ca...@gmail.com <ca...@gmail.com> #101
ph...@hotmail.com <ph...@hotmail.com> #102
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all files for configuration ':app:classpath'.
> Could not find gradle.jar (com.android.tools.build:gradle:2.3.1).
Searched in the following locations:
> Could not find gradle-core.jar (com.android.tools.build:gradle-core:2.3.1).
Searched in the following locations:
> Could not find builder.jar (com.android.tools.build:builder:2.3.1).
Searched in the following locations:
> Could not find lint.jar (com.android.tools.lint:lint:25.3.1).
Searched in the following locations:
> Could not find gradle-api.jar (com.android.tools.build:gradle-api:2.3.1).
Searched in the following locations:
> Could not find compilerCommon.jar (com.android.databinding:compilerCommon:2.3.1).
Searched in the following locations:
> Could not find lint-checks.jar (com.android.tools.lint:lint-checks:25.3.1).
Searched in the following locations:
> Could not find lint-api.jar (com.android.tools.lint:lint-api:25.3.1).
Searched in the following locations:
> Could not find tracker.jar (com.android.tools.analytics-library:tracker:25.3.1).
Searched in the following locations:
> Could not find shared.jar (com.android.tools.analytics-library:shared:25.3.1).
Searched in the following locations:
> Could not find protos.jar (com.android.tools.analytics-library:protos:25.3.1).
Searched in the following locations:
> Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:25.3.1).
Searched in the following locations:
> Could not find sdk-common.jar (com.android.tools:sdk-common:25.3.1).
Searched in the following locations:
> Could not find builder-model.jar (com.android.tools.build:builder-model:2.3.1).
Searched in the following locations:
> Could not find builder-test-api.jar (com.android.tools.build:builder-test-api:2.3.1).
Searched in the following locations:
> Could not find sdklib.jar (com.android.tools:sdklib:25.3.1).
Searched in the following locations:
> Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:25.3.1).
Searched in the following locations:
> Could not find layoutlib-api.jar (com.android.tools.layoutlib:layoutlib-api:25.3.1).
Searched in the following locations:
> Could not find dvlib.jar (com.android.tools:dvlib:25.3.1).
Searched in the following locations:
> Could not find repository.jar (com.android.tools:repository:25.3.1).
Searched in the following locations:
> Could not find common.jar (com.android.tools:common:25.3.1).
Searched in the following locations:
> Could not find baseLibrary.jar (com.android.databinding:baseLibrary:2.3.1).
Searched in the following locations:
> Could not find annotations.jar (com.android.tools:annotations:25.3.1).
Searched in the following locations:
pa...@gmail.com <pa...@gmail.com> #103
Re #102: All of those links are working for me when I click on them. Please try clearing your Gradle cache, because it should be finding those artifacts.
ra...@gmail.com <ra...@gmail.com> #104
buildscript {
repositories {
maven {
url "
}
}
}
When @google will fix the issue remove this workaround!!
de...@gmail.com <de...@gmail.com> #105
he...@gmail.com <he...@gmail.com> #106
Marking this as fixed. Additional followup is pending on mirroring old artifacts into
th...@gmail.com <th...@gmail.com> #107
to...@gmail.com <to...@gmail.com> #108
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not find support-compat.aar (com.android.support:support-compat:26.1.0).
Searched in the following locations:
--- EDIT ---
Fixed it, if there's anyone who have the same problem I had this is what I did:
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=25.+
sv...@jacobsen.se <sv...@jacobsen.se> #109
si...@gmail.com <si...@gmail.com> #110
> Could not resolve all files for configuration ':react-native-camera:classpath'.
> Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.0.0).
Searched in the following locations:
> Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:26.0.0).
Searched in the following locations:
> Could not find dvlib.jar (com.android.tools:dvlib:26.0.0).
Searched in the following locations:
> Could not find common.jar (com.android.tools:common:26.0.0).
Searched in the following locations:
ar...@gmail.com <ar...@gmail.com> #111
Build returns this error:
Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.0.1).
Searched in the following locations:
Is there any fix ?
Thanks
Franck
Version:
Android Studio 3.2.1
Build #AI-181.5540.7.32.5056338, built on October 9, 2018
JRE: 1.8.0_152-release-1136-b06 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
we...@gmail.com <we...@gmail.com> #112
Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.0.1).
Searched in the following locations:
Even the projects that were working fine like 5 days ago they are also giving the same error. Please let me know if there's any work around or fix.
ry...@gmail.com <ry...@gmail.com> #113
ma...@gmail.com <ma...@gmail.com> #114
ERROR: Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.0.1).
Searched in the following locations:
ca...@gmail.com <ca...@gmail.com> #115
ja...@dieboldnixdorf.com <ja...@dieboldnixdorf.com> #116
ie...@gmail.com <ie...@gmail.com> #117
Here is what was working for me:
allprojects {
buildscript.repositories {
maven {
url "
}
jcenter ({
url "
})
}
repositories {
maven {
url "
}
jcenter ({
url "
})
}
}
ti...@gmail.com <ti...@gmail.com> #118
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.google.firebase:firebase-iid:[17.0.2].
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.google.firebase:firebase-iid:[17.0.2].
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.google.firebase:firebase-iid:[17.0.2].
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve com.google.firebase:firebase-iid:[17.0.2].
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve com.google.firebase:firebase-iid:[17.0.2].
Show Details
Affected Modules: app
ec...@gmail.com <ec...@gmail.com> #119
Example:
buildscript {
repositories {
google()
jcenter()
maven {
url '
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.google.gms.google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.28.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
EDIT:
Nevermind. the firebase crashlytics tutorial had this:
(found here:
classpath 'com.google.gms.google-services:4.2.0'
Instead of:
classpath 'com.google.gms:google-services:4.2.0'
z0...@gmail.com <z0...@gmail.com> #120
ti...@gmail.com <ti...@gmail.com> #121
..
> cordova build android
cordova-android-support-gradle-release: Android platform: V7+
cordova-android-support-gradle-release: Wrote custom version '27.+' to E:\customer portal\My Nayatel\My Nayatel\platforms\android\app\build.gradle
cordova-android-support-gradle-release: Wrote custom version '27.+' to E:\customer portal\My Nayatel\My Nayatel\platforms\android\cordova-android-support-gradle-release\mynayatel-cordova-android-support-gradle-release.gradle
Android Studio project detected
cordova-android-support-gradle-release: Android platform: V7+
cordova-android-support-gradle-release: Wrote custom version '27.+' to E:\customer portal\My Nayatel\My Nayatel\platforms\android\app\build.gradle
cordova-android-support-gradle-release: Wrote custom version '27.+' to E:\customer portal\My Nayatel\My Nayatel\platforms\android\cordova-android-support-gradle-release\mynayatel-cordova-android-support-gradle-release.gradle
ANDROID_HOME=C:\Users\PC\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_71
studio
Subproject Path: CordovaLib
Subproject Path: app
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> Could not resolve all files for configuration ':CordovaLib:classpath'.
> Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.0.0).
Searched in the following locations:
> Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:26.0.0).
Searched in the following locations:
> Could not find dvlib.jar (com.android.tools:dvlib:26.0.0).
Searched in the following locations:
> Could not find common.jar (com.android.tools:common:26.0.0).
Searched in the following locations:
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at
BUILD FAILED in 4s
(node:8816) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> Could not resolve all files for configuration ':CordovaLib:classpath'.
> Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.0.0).
Searched in the following locations:
> Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:26.0.0).
Searched in the following locations:
> Could not find dvlib.jar (com.android.tools:dvlib:26.0.0).
Searched in the following locations:
> Could not find common.jar (com.android.tools:common:26.0.0).
Searched in the following locations:
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at
BUILD FAILED in 4s
at ChildProcess.whenDone (E:\customer portal\My Nayatel\My Nayatel\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:8816) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:8816) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
mi...@gmail.com <mi...@gmail.com> #122
ge...@gmail.com <ge...@gmail.com> #123
s....@gmail.com <s....@gmail.com> #124
Error:Could not find com.android.tools.build:gradle:3.0.0.
Searched in the following locations:
- file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
-
Required by:
project :
su...@google.com <su...@google.com>
ak...@gmail.com <ak...@gmail.com> #125
po...@gmail.com <po...@gmail.com> #126
mi...@gmail.com <mi...@gmail.com> #127
cs...@gmail.com <cs...@gmail.com> #128
ru...@gmail.com <ru...@gmail.com> #129
mi...@gmail.com <mi...@gmail.com> #130
mi...@gmail.com <mi...@gmail.com> #131
ch...@gmail.com <ch...@gmail.com> #132
"the permanent solution is to switch to artifacts that can be found in other repositories."?
Thank you!
si...@gmail.com <si...@gmail.com> #133
to...@gmail.com <to...@gmail.com> #134
What was the mistake is 0 communication to users and devs for something that was known with large UX impact.
You can't imagine the number of mails and bad rating received from users no more able to control their volume when casting from well casting apps (not all apps are about Chromecast).
1 line in Android 12 app behavior change was all that was necessary for devs to prepare for the wave and warn users.
To this day, there's still 0 note on Android 12 page changes and still devs loosing time after being assaulted by users to understand what is going on until they find out this issue.
pa...@gmail.com <pa...@gmail.com> #135
Doesn't seem to be the "volume bar greyed out" issue, although I can see the Casting Volume bar is indeed greyed out on this phone; instead, there is no sound at all being streamed.
he...@gmail.com <he...@gmail.com> #136
th...@gmail.com <th...@gmail.com> #137
me...@gmail.com <me...@gmail.com> #138
j....@gmail.com <j....@gmail.com> #139
an...@gmail.com <an...@gmail.com> #140
jo...@contreras.com.co <jo...@contreras.com.co> #141
Correct action should be to fix this on all devices, Googlers deliberately put a bug, ethical move is to fix it for everyone.
I say this as a user, we don't pay for a Pixel with monopoly money. However what we get is rude Googlers who don't care about users.
ka...@gmail.com <ka...@gmail.com> #142
ar...@gmail.com <ar...@gmail.com> #143
To everyone who comes here just to write abusing comments: please stop it. I did NOT create this thread to abuse or blame anyone. This is not the way the community should act.
I am sure that all the people who subscribed to this thread don't want to read such comments. People prefer to receive valuable emails with status updates. If you are affected, please star the issue.
Regarding the issue itself: it is very serious to me, since it affects the core functionally of my app and I have to face hundreds (soon thousands) of irritated users.
To Google Team: is there any timeline on when you are planning to tackle the issue? I would like to know what should I communicate to users of my app. Thank you in advance.
sp...@gmail.com <sp...@gmail.com> #144
According to Mishaal Rahman (Senior Editor on XDA) on Twitter, looks like there is a workaround included in the 12L beta release today. Can't control volume with the physical volume buttons, but the cast volume level is now included and enabled on the volume panel pop-up.
se...@gmail.com <se...@gmail.com> #145
ar...@gmail.com <ar...@gmail.com> #146
In response to
I have just tested this on S2B1.211112.006
build and the issue is still present. Volume button click events are still NOT provided to VolumeProviderCompat
when a remote MediaSessionCompat
is registered. Therefore, the behavior is still inconsistent with the documentation.
Repeating my previous question to the Google Team: is there any timeline on when you are planning to tackle the issue? I would like to know what should I communicate to users of my app, since they are becoming more and more irritated :(
me...@gmail.com <me...@gmail.com> #147
Not every usecase is related to media.
Accessibility for some users that previously used the buttons for other actions other than volume controls is also impacted.
ol...@google.com <ol...@google.com> #148
I hope to be able to provide a more general update shortly. In the meantime, some specific notes for the attention of the original reporter:
I have just tested this on S2B1.211112.006 build and the issue is still present. Volume button click events are still NOT provided to VolumeProviderCompat when a remote MediaSessionCompat is registered. Therefore, the behavior is still inconsistent with the documentation.
Are you sure about this? I flashed the same build and tried the reproduction steps exactly as specified at the top of this thread. Volume adjustment with the hardware keys worked for me, with the app backgrounded and with the display both on and off.
According to Mishaal Rahman (Senior Editor on XDA) on Twitter, looks like there is a workaround included in the 12L beta release today. Can't control volume with the physical volume buttons, but the cast volume level is now included and enabled on the volume panel pop-up.
Mishaal appears to have been testing with YouTube Music. Confusingly, volume adjustment when backgrounded doesn't appear to be enabled for YouTube Music at all, on any device or Android version. The YouTube Music team are looking into this. For the purpose of testing the underlying platform behavior, please test with other apps that support Cast.
ka...@gmail.com <ka...@gmail.com> #149
ka...@gmail.com <ka...@gmail.com> #150
an...@gmail.com <an...@gmail.com> #151
Is there a timeline when to expect the fix/work around to be release to Pixel 3 or Newer Pixel's in Prod build?
ar...@gmail.com <ar...@gmail.com> #152
Replying to
Are you sure about this? I flashed the same build and tried the reproduction steps exactly as specified at the top of this thread. Volume adjustment with the hardware keys worked for me, with the app backgrounded and with the display both on and off.
I tested it again on S2B1.211112.006
and I observed that the behavior is inconsistent. Initially, when I started casting music, it was not working - after backgrounding the app I was pressing hardware buttons and the device was changing the volume of its local music stream (despite the fact that the music was playing on the remote device I was casting to).
Then I stopped casting, entered the app, started casting again, backgrounded the app and it was working (!) both when screen was on and off. When I was pressing volume buttons, the volume on Google Home Mini was adjusted (great!). The volume popup with the slider was not showing up after pressing the button (on Android 11 it was visible, with a casting icon). However it stopped working itself after a while (a few minutes) - the casting session was active all the time.
Then another restart of the casting session, but it didn't work. After multiple tries of starting and stopping casting, it worked again. And this time it was working until I stopped casting (around 5 - 8 minutes).
Then another restart of the casting session, but I didn't manage to make it working again.
I tried to find some pattern on when it starts/stops working, but I couldn't. It seems to happen randomly now. And I think that comment
I recorded a bug report, maybe it will help with finding the root cause.
Here is the link:
Please let me know if there is anything else I can test.
te...@gmail.com <te...@gmail.com> #153
ak...@gmail.com <ak...@gmail.com> #154
ar...@gmail.com <ar...@gmail.com> #155
Yet another reply to
I have created a
Basically VolumeProviderCompat
still does not get information about volume button clicks. I have tested it on S2B1.211112.006
build (Android 12).
On Android 11 the example app works fine.
To Google Team - please have a look at the above example. Are you able to reproduce the problem now?
ol...@google.com <ol...@google.com> #156
I think it's important to decouple:
- Adjusting the volume when casting from many popular applications, which is what most of the posts on this issue are referring to.
- The more technical question of volume button clicks being delivered to
VolumeProviderCompat
.
(1) should be enabled in Android 12L for the vast majority of use cases, although there are a couple of exceptions that are confusing things somewhat (e.g., YouTube Music, as discussed above). I am following up on these exceptions.
You are correct that for direct use of MediaSession
as implemented in your demo app, (2) is not enabled, and I am able to reproduce this. The way we've enabled (1) is that when there's a media session using remote volume control functionality, we look at properties of the corresponding media routes that are selected by the process. Cast integrates with MediaRouteProvider
/MediaRouter
, and so the underlying framework is able to query the selected media routes. Your demo app does not do this, and therefore volume button clicks are still not routed as you'd expect. For Cast-like use cases (but using some other non-Cast protocol, for example DIAL), we would still expect apps to integrate with MediaRouteProvider
/MediaRouter
, which should be sufficient for volume button clicks to be delivered.
I appreciate that (2) is not as documented, and is something that we'll continue to look at resolving. I also wonder whether you have a use case that requires direct MediaSession
integration but where integration with MediaRouteProvider
/MediaRouter
is not appropriate, or whether you've just done it this way in your demo to provide a minimal example. It's somewhat unclear what the initial motivation was for filing the issue, since the initial description contained both a description of (2) and reproduction steps that fall under (1). If you have such a use case, it would be interesting to understand it in more detail. Thanks!
to...@gmail.com <to...@gmail.com> #157
Exactly what I feared when they said workaround :)
My app can play and cast media to Upnp devices, Roku devices, Fire TV devices, Kodi and a few more, my users expect volume control when screen off to work in all those cases and not just when casting to Chromecast (that I support too).
VolumeProviderCompat was the only proper way to achieve that properly, including proper description if the devices supported discrete volume values or only +/- commands.
How are we supposed to do that with MediaRouteProvider/MediaRouter? (Considering too that MediaRouter currently force embedding AppCompat/Recyclerview/ ... and is unwanted in a pure compose world see
ol...@google.com <ol...@google.com> #158
Re #157, I think your use case falls exactly under:
For Cast-like use cases (but using some other non-Cast protocol, for example DIAL), we would still expect apps to integrate with
MediaRouteProvider
/MediaRouter
, which should be sufficient for volume button clicks to be delivered.
If the underlying framework can query the selected media routes for your process, then I think volume button clicks will be delivered to your VolumeProviderCompat
as you expect. For Cast-like use cases such as the ones you describe, we generally expect apps (or the SDKs that they're using) to integrate with MediaRouteProvider
/MediaRouter
, like the Cast SDK does, which is sufficient to allow the underlying framework to do this and therefore for volume button clicks to be delivered. My understanding is that some other apps that use DIAL also do things this way, which is again similar to your use case.
How are we supposed to do that with MediaRouteProvider/MediaRouter? (Considering too that MediaRouter currently force embedding AppCompat/Recyclerview/ ... and is unwanted in a pure compose world see
) https://issuetracker.google.com/issues/210099272
I think you should be able to do the same thing that the Cast SDK does. Implement a MediaRouteProvider
to inform the platform about available non-Cast routes, and integrate with MediaRouter
so that the platform knows which route is selected.
The issue you link to seems to be at best tangentially related. I'd also note that if you support Cast then you're probably depending on play-services-cast-framework
, in which case I think you'll already be pulling in androidx.mediarouter:mediarouter
as a transitive dependency as per the
ar...@gmail.com <ar...@gmail.com> #159
Replying to
Thanks for the detailed explanation. Answering to your question:
I also wonder whether you have a use case that requires direct MediaSession integration but where integration with MediaRouteProvider/MediaRouter is not appropriate, or whether you've just done it this way in your demo to provide a minimal example.
The use case of my app is that it needs to receive events about button clicks (also when the screen is off) in order to interpret them and execute some actions if needed. By actions I mean e.g. integration with other apps via MediaController
objects queried from MediaSessionManager
in order to e.g. control the playback.
So technically my app doesn't need to use MediaRouteProvider
/MediaRouter
, it just needs to be notified when a volume button is clicked (both when pressed and released).
In the ticket description the reproduction steps I described were referring to (1), as I believed that it be easier to understand that way. Right now I think that we can treat the example app and the "Steps to reproduce" from its README file as a reference.
to...@gmail.com <to...@gmail.com> #160
I disable transitive, have my own copy of media router and the gain is more than 1 MB in total so nearly 40% gain ... Same reason I don't update to cast 20.x+ as it add 350Kb and there's nowhere to report that. So if we are now forced to use that lib to control volume it's kinda related even if only by side effect. Even if easy maintaining a copy of media router is evitable pain is it's splitted.
About mediarouterprovider those routes should not be selectable by other apps at all. I don't think that it's possible to have them private to the app or media session, or it's not documented.
ol...@google.com <ol...@google.com> #161
Re #160:
Same reason I don't update to cast 20.x+ as it add 350Kb and there's nowhere to report that
It looks like you can report issues with the Cast SDK here:
About mediarouterprovider those routes should not be selectable by other apps at all. I don't think that it's possible to have them private to the app or media session, or it's not documented.
According to the MediaRouteProvider
documentation
A media route provider may be used privately within the scope of a single application process by calling MediaRouter.addProvider to add it to the local MediaRouter. A media route provider may also be made available globally to all applications by registering a MediaRouteProviderService in the provider's manifest. When the media route provider is registered as a service, all applications that use the media router API will be able to discover and used the provider's routes without having to install anything else.
I'm not sure, but it may also be possible to use MediaRouteProviderService
with android:exported="false"
.
to...@gmail.com <to...@gmail.com> #162
Nice to see Cast is now on the tracker, will report the size issue.
And thanks for the doc pointer, I always stopped at
Since migrating to that still wont solve Android 12 issue and it's quite some work, can you confirm the meaning of "I appreciate that (2) is not as documented, and is something that we'll continue to look at resolving." Does it means the docs will be updated to explains it won't work in the future, or that there's still hope something is done for 12L or for a future later release?
pu...@gmail.com <pu...@gmail.com> #163
On Android 11 (not sure about 12L, since I did not test), it is very well possible to receive VolumeProviderCompat events (hardware volume buttons changes when app is playing in the background, with screen eventually off) outside of any route management with:
mediaSession.setPlaybackToRemote(volumeProvider); mediaRouter.setMediaSessionCompat(null); // for volume control by VolumeProviderCompat rather than a route
I hope this functionality will still work on 12L.
ar...@gmail.com <ar...@gmail.com> #164
On Android 11 (not sure about 12L, since I did not test), it is very well possible to receive VolumeProviderCompat events (hardware volume buttons changes when app is playing in the background, with screen eventually off)
Unfortunately it still doesn't work that way on 12L (at least yet).
MediaSessionCompat
and VolumeProviderCompat
, without the need to implement MediaRouteProvider
/MediaRouter
.
I also hope that we will get this functionality back, otherwise my app will be useless (reacting for volume button clicks is part of its core feature).
pu...@gmail.com <pu...@gmail.com> #165
Yup confirming it's not working (using MediaSessionCompat + VolumeProviderCompat) on 12L with my app. Though Chromecast volume backed by a Route is working. I also hope that it will be fixed to work like it did prior to Android 12, so a Route is not required. My app handle playback (and volume control) to external devices without the complexity of using a Route. I also notice that in 12L, the media notification always mention "Other device" in the top-right corner, even when a Chromecast is made active by setting its route current.
ar...@gmail.com <ar...@gmail.com> #167
Thanks for sharing the news.
I think that now I understand what was the reasoning behind disabling the volume control while casting to external devices. It looks like controlling the volume for multiple cast devices at the same time violates the Sonos's patent (at least this is what Sonos claims), so e.g. controlling the volume of Speaker Groups had to be disabled. I don't have a full context so please correct me if I'm wrong.
I've also made some research in the recent Android source code changes and it looks like now the system verifies whether there is more than 1 route active for a process and if so, prevents adjusting the volume to not infringe the patent. Moreover, Android also requires that the process (app) with active MediaSession
I understand that to meet the current legal requirements, the system has to prevent delivering volume button click events if an app has many selected routes.
However, I wonder if it would be possible for the system not to require apps to have 1 selected routing session in order to receive volume button click events. This way app developers can still deliver features that allow users to control the currently played media (also played only locally) with volume buttons without the need to turn on the screen. By controlling the media, I mean not only changing the volume but also performing custom actions like "skip to next" or "skip to previous" (so the user is able to skip a track by long pressing the physical volume button). For that the app needs to listen for volume button clicks without adding a media route.
Such system behaviour would be also consistent with the behaviour of previous Android versions (pre 12).
To Google Team: I really appreciate the effort you put into resolving this issue. Do you think it would be still possible to make such change?
ar...@gmail.com <ar...@gmail.com> #168
Hi! Are there any updates on this issue?
Please let me know if you need any further information from my side.
ph...@hotmail.com <ph...@hotmail.com> #169
pu...@gmail.com <pu...@gmail.com> #170
And it still also works when an app control volume using a Route. No way to just use VolumeProviderCompat + MediaSession like it was possible pre Android 12 (see #163, #164).
pu...@gmail.com <pu...@gmail.com> #171
Still not working (#170, #163, #164) with 12L beta 3. I have little hope that VolumeProviderCompat will ever work again if not handled by a Route... That would be really unfortunate.
ar...@gmail.com <ar...@gmail.com> #172
ol...@google.com <ol...@google.com> #173
We don't have any further update. Post #156 above is still accurate.
However, I wonder if it would be possible for the system not to require apps to have 1 selected routing session in order to receive volume button click events.
We looked into this when we made the changes for Android 12L (which were also included in the Pixel January update), but unfortunately it wasn't a feasible approach.
ar...@gmail.com <ar...@gmail.com> #174
Ok, so by saying:
I appreciate that (2) is not as documented, and is something that we'll continue to look at resolving.
do you mean that volume button clicks will be delivered to VolumeProviderCompat
in a future Android release? Or if there are no chances that we will get this behaviour back?
In case there are no plans to restore this functionally, do we have any alternative way of listening volume button clicks when the screen is off?
an...@gmail.com <an...@gmail.com> #175
I am joining question #174.
Being able to receive volume button clicks is an essential feature of my app.
It would be great if an alternative was offered to get button presses.
Thank you very much for your help.
ma...@gmail.com <ma...@gmail.com> #176
My app uses physical buttons to initiate communication messages between users - and the inability to detect the volume buttons from sleep is an absolute killer. Answer #156 claims that there's still a path to detecting volume events, but saying it "should be sufficient" is a far cry from this basic functionality that was readily accessible in Android 11.
So I guess I join #174 and #175 and plea for an explicit path to access the physical buttons!
an...@gmail.com <an...@gmail.com> #177
Hi Google Team
Are there any updates on this issue?
My app uses physical buttons in order to trigger emergency alarms. The volume buttons were the only reliable physical buttons (available on all devices) for this purpose. As #176 said, the inability to detect the volume buttons from sleep is an absolute killer also for my app.
It is extremely frustrating, that Android does not allow apps simply to receive clicks on physical buttons (even when running in the background). I can not understand why is this so complicated or perhaps security-relevant.
Your help would be greatly appreciated
ol...@gmail.com <ol...@gmail.com> #178
I agree with the other users about monitoring the volume buttons even when the screen is off. I use the volume buttons to let the user interact with my app even when the screen is off - actually having nothing to do with media playback. My vote is for an addition to the API that allows for direct monitoring of the volume buttons (albeit it should also work if you are using the volume buttons on a connected device (e.g., Bluetooth headset)).
In any case, until this gets solved by Google, I figured out a way to achieve equivalent functionality based on the BroadcastReceiver class and have published a demo app at
ar...@gmail.com <ar...@gmail.com> #179
I have tested the above demo app, but unfortunately I cannot not say it provides an equivalent functionality. The main 3 reasons are:
- The broadcast receiver is invoked only when the volume changes. So if the volume reaches its max/min level, we do not receive events informing that the user pressed a physical volume button.
- The app has to play music (silence?) and keep
PARTIAL_WAKE_LOCK
to receive these events while the screen is off. Such solution drains the device's battery because it prevents the device from entering lower power states (please have a look at ). This is not acceptable in a production app.the documentation - Such approach does not provide information when the physical button is released, so it is impossible to detect long press of the volume button (and actually the
onLongPress()
method from the demo app is never called for me).
All the above drawbacks did not exist in the original approach with VolumeProviderCompat
. To sum up - I cannot implement the proposed workaround in my app. Due to (2) problem mentioned above, I would not recommend anyone to implement it in their apps as well.
ol...@gmail.com <ol...@gmail.com> #180
@#179: I agree that this is not an ideal solution, but it is the only one I could find until this gets fixed by Google. If you know another way, please share it with the community.
- On my Samsung Galaxy S20 with Android 12 installed,
BroadcastReceiver
gets invoked even when the volume is at max/min level. There may be different implementations by different manufacturers. I have some ideas for a workaround, but that's beyond the scope of this forum. - In my example, I used
PARTIAL_WAKE_LOCK
to keep the app running in the background. Since my fitness app already usesPARTIAL_WAKE_LOCK
, this is not an issue for me. There are other methods to achieve that (e.g.WorkManager
). - My
VolumeButtonHelper
class does provide the equivalent of releasing the physical button. If that's not working for you and you would like me to look into this, please create an "Issue" at .github.com/oliverClimbs/VolumeButtonDemo
ar...@gmail.com <ar...@gmail.com> #181
I tried to add the support for media routing to the
Here is
I added a "Cast" menu item, which allows to select the target device. I also implemented a custom MediaRouteProvider
(called Demo Cast
) - it should be always available (even if the device has no WiFi connection). The Demo Cast
is visible in the Cast selector dialog and the app successfully selects its route. However, even when the Demo Cast
is selected, volume button events are note delivered to the VolumeProviderCompat
.
Steps to reproduce:
- Build the example app from
branch and run on a device with Android SC V2 (12.1).cast-integration - Click the "Cast" button in the top-right corner.
- Select the "Demo Cast" device.
- You should now see "Demo Cast" name in the main app screen (under "Start Service" button).
- Click the "Start Service" button.
- Click the physical volume button.
Expected result:
The button click event should be delivered to the VolumeProviderCompat
- it should be confirmed by a toast message.
Actual result:
Events are not delivered to the VolumeProviderCompat
and no toast is shown.
If we select another target device (e.g. Chromecast), the events are delivered properly.
Do you know what am I doing wrong? Is there something missing in the custom MediaRouteProvider
? Why does not Android detect that the example app has an active route selected?
I have tested it on SP2A.220305.013.A3 build.
to...@gmail.com <to...@gmail.com> #182
For the record to gain time for others setPlaybackToRemote is not compatible with Android Auto, will half crash then badly reconnect and fails AA validation process. Tried for years to pass the level one to demonstrate the issue on AA team so they fix...
ja...@gmail.com <ja...@gmail.com> #184
Look forward to some progress!
J
pu...@gmail.com <pu...@gmail.com> #185
It's clear to me at this point that Google isn't interested in provide pre-Android 12 behavior, and it's just about providing volume control (screen off or app not in foreground) for Chromecast devices or any other device providing a Route...
ja...@gmail.com <ja...@gmail.com> #186
ja...@gmail.com <ja...@gmail.com> #187
pu...@gmail.com <pu...@gmail.com> #188
Spotify probably implemented a custom MediaRoute associated to whatever external device they control the volume.
so...@gmail.com <so...@gmail.com> #189
he...@googlemail.com <he...@googlemail.com> #190
ar...@gmail.com <ar...@gmail.com> #191
Hi Google Team!
Is there any update on this issue?
sv...@jacobsen.se <sv...@jacobsen.se> #192
1. Few apps works still - even YouTube only works when the app is actually open (for me anyway).
2. The apps that somewhat works (like Spotify) now always take precedence over other streaming media on the phone (I used to be able to Cast video/music but still, if I watched another video on the phone at the same time, the volume was instead adjusted locally).
So, a perfectly working solution on Android 11 still broken in Android 12.
fa...@azetti.com <fa...@azetti.com> #193
We don't use Cast at all in our application, so it does not make sense for us to use MediaRouteProvider.
Our users can configure the volume buttons to perform some actions of our app when in the background or with the screen off. This a demand of our users who don't understand how it does not work since Android 12.
Our app basically uses the VolumeProvider as indicated in example:
It is clear that this use case is not solved even in Android 12.1.
Are you still looking at a solution to this?
Introducing the MediaRouteProvider, as demonstrated by #181, is not working in Android 12.1.
The only possible workaround seems to be #178, which causes a drain to the battery and is not a general solution for all phones.
ar...@gmail.com <ar...@gmail.com> #194
Hi Google Team! Are there any updates on this issue? I would really appreciate any information. It's crucial for my project.
BTW I accidentally got removed from the CC list, could you please add me back?
ol...@google.com <ol...@google.com>
an...@gmail.com <an...@gmail.com> #195
Hello Google team,
It is really astonishing that apps can't easily get events that inform when hardware keys are pressed.
Would it be possible to make such events accessible via BroadcastReceiver? Even if the app is in the background. This would make the development work of many apps much easier.
I can't imagine that the notification that a hardware key has been pressed, released, or held could be a security problem.
Performance problems can't be either, because such keys are not pressed very often.
Please, help us developers
sv...@jacobsen.se <sv...@jacobsen.se> #196
Hope this will stick!!!
I'm just a user having had to put up with buggy volume buttons across multiple apps since the day Android 12 landed. It has been a rough couple of months. It's really something worth changing OS for - a real mess actually!
fa...@azetti.com <fa...@azetti.com> #197
For those of you that need a workaround for Android 12, I'll let you know my findings:
* I added an AccessibilityService overriding the onKeyEvent method. This way you get the key presses even when your app is in the background. However, this only works when screen is on. Also, the AccessibilityService won't work for apps that are installed in the work profile.
* Not ideal, but users can be instructed to first press the Power button to light up the screen and then press the volume key they want. Still, if your use case is to press & hold the volume key, this won't work because the screen will power off automatically while holding the volume key. I tried to set some screen lock, but this is not working in some phones like Samsung.
* If users are instructed to do the above, another option I found was to show your app in the locked screen using setTurnScreenOn and setShowWhenLocked. This will show your app in foreground after pressing the Power button, only if the user left your app in foreground when powering off the screen, and then you will receive the KeyEvents.
Hope this is useful to someone.
ar...@gmail.com <ar...@gmail.com> #198
I am not entirely sure what the previous commenters mean by "it's working again", because I have just tested this on Android 13 (Pixel 6 as well, build no. TP1A.220624.021) and the VolumeProvider
still doesn't work as on pre Android 12 versions.
For tests I was using
The behaviour on Android 13 is still the same as on Android 12 - volume button events are not delivered to VolumeProviderCompat
.
I'm adding +1 to the comment
I will appreciate any feedback from Google.
ar...@gmail.com <ar...@gmail.com> #201
Hi! Are there any updates on this issue?
ba...@gmail.com <ba...@gmail.com> #202
pi...@gmail.com <pi...@gmail.com> #203
The only way I've found to adjust media volume is to go into Settings app, and adjust the slider there. I wonder if there's an option in the Google Home app (or could one be added?!) which toggles device volume control for each device. I think that would resolve this and many other issues.
en...@gmail.com <en...@gmail.com> #204
an...@gmail.com <an...@gmail.com> #205
I agree with the previous post. It is an indictment of Google to leave developers hanging like this. I can't believe that Google can not adapt Android to send physical button events to registered app services. That would open up many possibilities for apps. Developers would appreciate an explanation if this is a security or other issue.
pu...@gmail.com <pu...@gmail.com> #206
Google clearly does not want developers to be able to handle volume changes outside of Media routes. That's sad, especially since it was possible prior to Android 12.
vi...@gmail.com <vi...@gmail.com> #207
ar...@gmail.com <ar...@gmail.com> #208
How is it possible that the issue with 319 pluses, S2 severity and P2 priority cannot get a comment from a Google team member for almost a year?
The Android community members have already added over 200 comments, asking for a help with restoring the functionality which has been removed in Android 12 without prior warning.
Also, several use cases have been provided, justifying why such a problem is crucial, both for developers and users who love Android.
Can we escalate it somehow?
ak...@gmail.com <ak...@gmail.com> #209
At this point, it's pretty clear that nothing is going to be done short of someone inside Google sticking their neck out to pay to address the issue from a pretty high level as the workarounds that Google was working on were deemed to not be legally viable. I think the silence from Google speaks volumes here and we 'have our decision.'
jm...@gmail.com <jm...@gmail.com> #210
ja...@gmail.com <ja...@gmail.com> #211
ma...@gmail.com <ma...@gmail.com> #212
in...@issend.de <in...@issend.de> #213
But now with the current and previous beta-update it's again not working anymore?
Can someone confirm this?
sa...@gmail.com <sa...@gmail.com> #214
We really need to know if this feature of getting callbacks into VolumeProviderCompat is going to be fixed or not?
he...@googlemail.com <he...@googlemail.com> #215
I thought I've read a news last year saying the patent issues were resolved, so in case this is true, why hasn't the functionality been restored with recent updates? And if there is a new method for controlling the volume for remote streams, why does nearly no app adopt it? Maybe the API change wasn't emphasized sufficiently in the documentation?
iv...@gmail.com <iv...@gmail.com> #216
ro...@gmail.com <ro...@gmail.com> #217
I need it for more important thing then casting. My app controls volume level automatically. I need to detect user presses of volume key so I can adjust my auto volume controlled range.
Anyway I managed to make it work on Android 15. but the volume slider resets to previous value when pressing volume keys. but events do fire. You need to create a dummy playback for it to work.
Or you can poll the current volume in your service and compare it to the previous value stored in a property. That's what I did before trying this feature that doesn't work.
The problem is it will give a false detection when a headphone is connected or disconnected but you can try to test that too in the polling function.
override fun onCreate() {
super.onCreate()
handleManualVolumePress()
}
private fun handleManualVolumePress() {
mediaSession = MediaSessionCompat(this, "YourAppSession")
mediaSession?.setPlaybackToRemote(object : VolumeProviderCompat(
VOLUME_CONTROL_RELATIVE,
maxVol,
currentVol
) {
override fun onAdjustVolume(direction: Int) {
val now = System.currentTimeMillis()
if (now - lastVolumePressTime < 300) return
lastVolumePressTime = now
when (direction) {
1 -> {
}
-1 -> {
}
}
mediaSession?.setPlaybackState(
PlaybackStateCompat.Builder()
.setActions(
PlaybackStateCompat.ACTION_PLAY or
PlaybackStateCompat.ACTION_PAUSE)
.setState(PlaybackStateCompat.STATE_PLAYING, 0L, 1f)
.build()
)
mediaSession?.isActive = true
startDummyPlayback()
}
private fun startDummyPlayback() {
val sampleRate = 48000
val channelConfig = AudioFormat.CHANNEL_OUT_STEREO
val audioFormat = AudioFormat.ENCODING_PCM_16BIT
val bufferSize = AudioTrack.getMinBufferSize(sampleRate, channelConfig, audioFormat)
dummyAudioTrack = AudioTrack.Builder()
.setAudioAttributes(
AudioAttributes.Builder()
.setUsage(AudioAttributes.USAGE_MEDIA)
.setContentType(AudioAttributes.CONTENT_TYPE_MUSIC)
.build()
)
.setAudioFormat(
AudioFormat.Builder()
.setEncoding(audioFormat)
.setSampleRate(sampleRate)
.setChannelMask(channelConfig)
.build()
)
.setBufferSizeInBytes(bufferSize)
.setTransferMode(AudioTrack.MODE_STREAM)
.build()
dummyAudioTrack?.play()
dummyThread = thread(start = true) {
val silence = ByteArray(bufferSize)
while (dummyAudioTrack?.playState == AudioTrack.PLAYSTATE_PLAYING) {
dummyAudioTrack!!.write(silence, 0, silence.size)
}
}
}
Description
Are you an Android developer?" (Y/N)
Yes
Which Android Developer Preview or Betabuild are you using? See Settings > About phone > Build number (for example RPP1.200123.000).
SPB5.210812.003
Is this a regression from Android 11 to 12?
Yes
What device are you using?
Android Emulator (created with Android Studio): sdk_gphone64_x86_64-userdebug SPB5.210812.003 7673742 dev-keys CPU/ABI: Google APIs Intel Atom (x86_64) Target: google_apis [Google APIs] (API level 31)
Affected apps
Any app that casts audio to external device (e.g. com.spotify.music).
What are the steps to reproduce the problem?
Volume button clicks events are not delivered to VolumeProviderCompat . After configuring setPlaybackToRemote(VolumeProviderCompat volumeProvider) , the media session does not receive volume button events. This results in a situation that a user cannot adjust the volume of the media when the device is casting audio.
MediaSessionCompat
by callingThe behavior is inconsistent with the documentation which clearly says that calling
setPlaybackToRemote
method "configures this session to use remote volume handling. This must be called to receive volume button events, otherwise the system will adjust the current stream volume for this session."Steps to reproduce:
Issue Category
Framework (platform)
What was the expected result?
The
VolumeProviderCompat
should receive events when volume buttons are clicked. The app which creates the MediaSessionCompat is able to react for these events and adjust the volume of audio stream that the device is currently casting.Documentation link that describes the expected behaviour
What was the actual result?
The
VolumeProviderCompat
does not receive volume button events. This makes the user unable to control the volume of the media that are being casted. The behavior is also inconsistent with the documentation and confusing for Android developers.Relevant logcat output
Logcat output attached below. There are 2 files attached. One contains the logcat output from Android 11 and the other one from Android 12. Both logcats were recorder by following the same steps provided above in "Steps to reproduce" section.