Closed panovvitalik closed 5 years ago
I was cut off using of this "shi..." library from my project. And reimplemented all work with direct REST calls. "Thank you"
So question is not actual.
I have the same issue and cannot find any workaround. Any idea how this can be solved?
I have the same issue and cannot find any workaround. Any idea how this can be solved?
I fixed it like this way, pls see code below: BUT! many fllowing issues I can not resolve, It looks like this library is not supporting :( . And I advice to reimplement Your code to direct REST calls - I already did it.
implementation ('io.grpc:grpc-protobuf:1.10.1'){ exclude group: 'org.apache.httpcomponents', module:'httpclient' } implementation ('io.grpc:grpc-stub:1.10.1'){ exclude group: 'org.apache.httpcomponents', module:'httpclient' } implementation ('com.google.api:gax:1.29.0'){ exclude group: 'org.apache.httpcomponents', module:'httpclient' } implementation ('io.grpc:grpc-okhttp:1.10.1'){ exclude group: 'org.apache.httpcomponents', module:'httpclient' } implementation ('com.google.photos.library:google-photos-library-client:1.1.0'){ exclude group: 'org.apache.httpcomponents', module:'httpclient' } implementation 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
Thank you! I tried the following dependencies and it works for me. Although I doubt you need it anymore at this moment :)
Exactly :)
Next Your issues when using this library possibly can be:
https://github.com/google/java-photoslibrary/issues/15 https://github.com/google/java-photoslibrary/issues/11
And these issues I cannot resolve :(
I found this to be a dependency issue. I have seen this problem and upon investigation, the code is internally trying to load android Application class with class.forName and if successful, it treats it as android and otherwise it is non android.
problem I saw was because some dependency I had android jar into my classpath (google guava android or so) so excluded that dependency and it worked pretty fine.
I think the error message should be improved and give more meaningful message than asking to add grpc-netty, because the error can happen even with grpc-netty in classpath.
@hmallepally Could you share some more details about the dependency issue? It would be great if you can share the exact dependency that's causing the problem. What did you have to exclude? Was this just grpc-netty
?
(Note that this library is not tested/supported on Android yet. I believe some of our dependencies have Android-specific versions that may help address some of these issues too, otherwise this is something we may have to take further upstream.)
Added: implementation 'com.google.photos.library:google-photos-library-client:1.1.0'
Trying to exexecute this code: PhotosLibrarySettings settings = PhotosLibrarySettings.newBuilder() .setCredentialsProvider( FixedCredentialsProvider.create(UserCredentials.newBuilder() .setClientId(GOOGLE_CLIENT_ID) .setClientSecret(GOOGLE_CLIENT_SECRET) .setAccessToken(new AccessToken("my access token", null)) .build())) .build();
Getting this error: io.grpc.ManagedChannelProvider$ProviderNotFoundException: No functional channel service provider found. Try adding a dependency on the grpc-okhttp or grpc-netty artifact
Please help. What should I do to fix this issue