'GoogleSignIn is marked as internal and should not be accessed from app' 用于新的 Google Play 服务实施

'GoogleSignIn is marked as internal and should not be accessed from app' for new Google Play Services implementation

我正在实施新的 'simpler' Google Play 服务实施(没有 GoogleApiClient 管理),并且由于错误 'GoogleSignIn is marked as internal and should not be accessed from app. This API had been flagged with a restriction that has not been met.' 而被红线标记,尽管有错误标志我的游戏应用程序仍在编译和 运行s,并且已经能够访问排行榜和成就。我想摆脱这个标志并知道它是否不仅仅是应该从 lint 中隐藏的东西,因为我不知道如何在我的应用程序之外访问 GoogleSignIn。

Games.getLeaderboardsClient(this, GoogleSignIn.getLastSignedInAccount(this))
            .getLeaderboardIntent(leaderboard_id)
            .addOnSuccessListener(new OnSuccessListener<Intent>() {
                @Override
                public void onSuccess(Intent intent) {
                    startActivityForResult(intent, RC_LEADERBOARD_UI);
                }
            });

2018 年 4 月 2 日更新:在修复 GoogleSignIn 的 12.0.1 更新后,我发现了更多 Google Play 服务代码错误标志。与之前的 GoogleSignIn 一样,它们不会影响编译或 运行,但仍然令人恼火。

已知问题 - 阅读 #4 https://developers.google.com/android/guides/releases#march_20_2018_-_version_1200 Google 表示可以安全地忽略它。

显然在 v 12.0.1 ...

中再次删除了错误的注释
android {
    dependencies {
        implementation "com.google.firebase:firebase-core:12.0.1"
    }
}