Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with play-services-auth 21.0.0 and google_sign_in_android 6.1.22 #20

Open
gourgouris opened this issue Mar 29, 2024 · 3 comments
Assignees

Comments

@gourgouris
Copy link

Describe the bug
I can't compile my (android) app in release mode after upgrading google_sign_in_android to 6.1.22.
I get errors (10+) like:

[ +1 ms] Missing class com.google.android.gms.auth.api.credentials.CredentialPickerConfig$Builder (referenced from: void fman.ge.smart_auth.SmartAuthPlugin.requestHint(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result))

To Reproduce
Steps to reproduce the behavior:

  1. Have both smart_auth and google_sign_in_android latest versions in a flutter project with android
  2. flutter build apk --release --verbose

Screenshots
N/A

smart_auth version: 2.0.0

Result of: flutter doctor --verbose

[√] Flutter (Channel stable, 3.19.3, on Microsoft Windows [Version 10.0.22621.3296], locale el-GR) • Flutter version 3.19.3 on channel stable at c:\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision ba39319843 (3 weeks ago), 2024-03-07 15:22:21 -0600 • Engine revision 2e4ba9c6fb • Dart version 3.3.1 • DevTools version 2.31.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at [reducted]
• Platform android-34, build-tools 34.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314)
• All Android licenses accepted.

[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.7.0)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.7.34003.232
• Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2023.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314)

[√] VS Code (version 1.87.2)
• VS Code at [reducted]
• Flutter extension version 3.84.0

[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22621.3296]
• Chrome (web) • chrome • web-javascript • Google Chrome 123.0.6312.59
• Edge (web) • edge • web-javascript • Microsoft Edge 120.0.2210.133

[√] Network resources
• All expected network resources are available.

• No issues found!

Smartphone (please complete the following information):

  • Device: Android Emulator
  • OS: Android API 33

Additional context
So, going through the release notes, google_sign_in_android says they upgraded play-services-auth to 21.0.0 (url)
The release notes of play-services-auth say that there is a major breaking change: they removed Credentials API! (https://developers.google.com/android/guides/releases#february_15_2024)
The settings.gradle of this plugin I see it depends on play-services-auth 20.7.0 (

implementation 'com.google.android.gms:play-services-auth:20.7.0'
)

I guess 21 is preferred over 20.7 during compilation, so no wonder why those classes mentioned in the error log can not be found.

This is why I think this is worthy of a bug report for smart_auth: can you please support the new Credential Manager API?

@Shub0327
Copy link

Shub0327 commented Jun 2, 2024

Did you implemented the Credential Manager API?

@sagnik-sanyal
Copy link

sagnik-sanyal commented Aug 20, 2024

Hi @Tkko @gourgouris i am ready to take up this issue but before starting i want some more info about that with the latest version we get something known as GetPhoneNumberHintIntentRequest.builder() which is completely different from the previous versions, whats you take on this ? Like i want to know your views on this

Edit i am taking about this version implementation 'com.google.android.gms:play-services-auth:21.2.0'

@mohamedshasho
Copy link

Same issue:

R8 Missing Classes Error in Release Build: Google Play Services Credentials API

Flutter Version

Flutter 3.24.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2663184aa7 (6 days ago) • 2024-09-11 16:27:48 -0500
Engine • revision 36335019a8
Tools • Dart 3.5.3 • DevTools 2.37.3

Error Log

ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in build/app/outputs/mapping/release/missing_rules.txt.

Missing class com.google.android.gms.auth.api.credentials.Credential$Builder (referenced from: com.google.android.gms.auth.api.credentials.Credential fman.ge.smart_auth.SmartAuthPlugin.maybeBuildCredential(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result))
Missing class com.google.android.gms.auth.api.credentials.Credential (referenced from: com.google.android.gms.auth.api.credentials.Credential fman.ge.smart_auth.SmartAuthPlugin$onGetCredentialRequest$1.$credential and 13 other contexts)
Missing class com.google.android.gms.auth.api.credentials.CredentialPickerConfig$Builder (referenced from: void fman.ge.smart_auth.SmartAuthPlugin.requestHint(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result))
Missing class com.google.android.gms.auth.api.credentials.CredentialPickerConfig (referenced from: void fman.ge.smart_auth.SmartAuthPlugin.requestHint(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result))
Missing class com.google.android.gms.auth.api.credentials.CredentialRequest$Builder (referenced from: void fman.ge.smart_auth.SmartAuthPlugin.getCredential(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result))
Missing class com.google.android.gms.auth.api.credentials.CredentialRequest (referenced from: void fman.ge.smart_auth.SmartAuthPlugin.getCredential(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result))
Missing class com.google.android.gms.auth.api.credentials.Credentials (referenced from: void fman.ge.smart_auth.SmartAuthPlugin.deleteCredential(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result))
Missing class com.google.android.gms.auth.api.credentials.CredentialsClient (referenced from: void fman.ge.smart_auth.SmartAuthPlugin.deleteCredential(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants